mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-11 09:18:08 +00:00
commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
- [Fetch Funding Rate History](./examples/js/)
|
||||
|
||||
|
||||
```javascript
|
||||
import ccxt from '../../js/ccxt.js';
|
||||
import asTable from 'as-table';
|
||||
|
||||
const table = asTable.configure ({ delimiter: ' | ' });
|
||||
|
||||
console.log ('CCXT Version:', ccxt.version)
|
||||
|
||||
async function main () {
|
||||
|
||||
const exchange = new ccxt.binanceusdm()
|
||||
, symbol = 'ETH/USDT'
|
||||
, since = undefined
|
||||
, limit = undefined
|
||||
, params = {}
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
// fetch the history of the funding rate for a symbol
|
||||
|
||||
const response = await exchange.fetchFundingRateHistory (symbol, since, limit, params)
|
||||
|
||||
console.log (table (response))
|
||||
|
||||
}
|
||||
|
||||
main ()
|
||||
|
||||
```
|
||||
Reference in New Issue
Block a user