mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 17:28:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
- [Bitrue Fetch Balance](./examples/js/)
|
||||
|
||||
|
||||
```javascript
|
||||
|
||||
|
||||
import ccxt from '../../js/ccxt.js';
|
||||
|
||||
async function main () {
|
||||
|
||||
console.log ('CCXT Version:', ccxt.version)
|
||||
|
||||
const exchange = new ccxt.bitrue ({
|
||||
"apiKey": "YOUR_API_KEY",
|
||||
"secret": "YOUR_SECRET",
|
||||
})
|
||||
|
||||
await exchange.loadMarkets ()
|
||||
|
||||
exchange.verbose = true
|
||||
|
||||
try {
|
||||
|
||||
const balance = await exchange.fetchBalance ()
|
||||
console.log (balance)
|
||||
|
||||
} catch (e) {
|
||||
console.log (e.constructor.name, e.message);
|
||||
}
|
||||
}
|
||||
|
||||
main ()
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user