Spot Margin Trade (Normal)
Documentation on interacting with ByBit's Spot Margin Trade (Normal) API functions through the PENDAX Javascript SDK.
All parameters of type INTEGER listed in the Bybit API docs need to be passed in as a string.
Get Margin Coin Info
Function name:
getMarginCoinInfo(options)Usage:
import { createExchange } from "./exchanges/exchange.js";
let myByBitAccount = createExchange({
exchange: "bybit",
authenticate: "true",
key: "myKeys",
secret: "mySecret",
label: "bybit",
testnet: "false"
});
async function getMarginCoinInfo(exchange, options) {
try {
let result = await exchange.getMarginCoinInfo(options);
console.log(result);
} catch (error) {
console.log(error.message);
}
}
const result = await getMarginCoinInfo(myByBitAccount);Get Borrowable Coin Info
Function name:
Usage:
Get Interest & Quota
Function name:
Usage:
Get Loan Account Info
Function name:
Usage:
Borrow
Function name:
Usage:
Repay
Function name:
Usage:
Get Borrow Order Detail
Function name:
Usage:
Get Repayment Order Detail
Function name:
Usage:
Toggle Margin Trade
Function name:
Usage:
Last updated