import { createExchange } from "./exchanges/exchange.js";
let myBitgetAccount = createExchange({
exchange: "bitget",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
passphrase: "myPassphrase",
label: "bitget",
marginType: "usdt"
});
async function getSingleTicker(exchange) {
try {
let result = await exchange.getSingleTicker();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getSingleTicker(myBitgetAccount,
{
symbol: "BTCUSDT_SPBL"
})
import { createExchange } from "./exchanges/exchange.js";
let myBitgetAccount = createExchange({
exchange: "bitget",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
passphrase: "myPassphrase",
label: "bitget",
marginType: "usdt"
});
async function getAllTickers(exchange) {
try {
let result = await exchange.getAllTickers();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getAllTickers(myBitgetAccount)
import { createExchange } from "./exchanges/exchange.js";
let myBitgetAccount = createExchange({
exchange: "bitget",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
passphrase: "myPassphrase",
label: "bitget",
marginType: "usdt"
});
async function getMarketTrades(exchange) {
try {
let result = await exchange.getMarketTrades();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getMarketTrades(myBitgetAccount,
{
symbol: "BTCUSDT_SPBL"
})
import { createExchange } from "./exchanges/exchange.js";
let myBitgetAccount = createExchange({
exchange: "bitget",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
passphrase: "myPassphrase",
label: "bitget",
marginType: "usdt"
});
async function getCandleData(exchange) {
try {
let result = await exchange.getCandleData();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getCandleData(myBitgetAccount,
{
symbol: "BTCUSDT_SPBL",
period: "1min",
})
import { createExchange } from "./exchanges/exchange.js";
let myBitgetAccount = createExchange({
exchange: "bitget",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
passphrase: "myPassphrase",
label: "bitget",
marginType: "usdt"
});
async function getDepth(exchange) {
try {
let result = await exchange.getDepth();
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getDepth(myBitgetAccount , {
symbol: "BTCUSDT_SPBL",
type: "step0",
});