23 lines
658 B
JavaScript
23 lines
658 B
JavaScript
const { RestClientV2 } = require('bitget-api');
|
|
|
|
|
|
// This example shows how to call this Bitget API endpoint with either node.js, javascript (js) or typescript (ts) with the npm module "bitget-api" for Bitget exchange
|
|
// This Bitget API SDK is available on npm via "npm install bitget-api"
|
|
// ENDPOINT: /api/v2/mix/market/ticker
|
|
// METHOD: GET
|
|
// PUBLIC: YES
|
|
|
|
const client = new RestClientV2({
|
|
apiKey: 'insert_api_key_here',
|
|
apiSecret: 'insert_api_secret_here',
|
|
apiPass: 'insert_api_pass_here',
|
|
});
|
|
|
|
client.getFuturesTicker(params)
|
|
.then((response) => {
|
|
console.log(response);
|
|
})
|
|
.catch((error) => {
|
|
console.error(error);
|
|
});
|