bitget-api
Version:
Complete Node.js & JavaScript SDK for Bitget V1-V3 REST APIs & WebSockets, with TypeScript & end-to-end tests.
206 lines (205 loc) • 5.1 kB
TypeScript
export interface PublicFillV3 {
execId: string;
price: string;
size: string;
side: 'sell' | 'buy';
ts: string;
}
export interface CandlestickV3 extends Array<string> {
0: string;
1: string;
2: string;
3: string;
4: string;
5: string;
6: string;
}
export interface ContractOiV3 {
symbol: string;
notionalValue: string;
totalNotionalValue: string;
}
export interface CurrentFundingRateV3 {
symbol: string;
fundingRate: string;
fundingRateInterval: string;
nextUpdate: string;
minFundingRate: string;
maxFundingRate: string;
}
export interface DiscountRateTierV3 {
tierStartValue: string;
discountRate: string;
}
export interface DiscountRateV3 {
coin: string;
list: DiscountRateTierV3[];
}
export interface HistoryFundingRateV3 {
symbol: string;
fundingRate: string;
fundingRateTimestamp: string;
}
export interface MarginLoanV3 {
dailyInterest: string;
annualInterest: string;
limit: string;
}
export interface OpenInterestItemV3 {
symbol: string;
openInterest: string;
}
export interface OpenInterestV3 {
list: OpenInterestItemV3[];
ts: string;
}
export interface PositionTierV3 {
tier: string;
minTierValue: string;
maxTierValue: string;
leverage: string;
mmr: string;
}
export interface RiskReserveRecordV3 {
balance: string;
amount: string;
ts: string;
type?: string;
}
export interface RiskReserveV3 {
totalBalance?: string;
coin: string;
riskReserveRecords: RiskReserveRecordV3[];
}
export interface RiskReserveHourRecordV3 {
amount: string;
balance: string;
ts: string;
}
export interface RiskReserveHourV3 {
coin: string;
riskReserveRecords: RiskReserveHourRecordV3[];
}
export interface RiskReserveAllItemV3 {
symbols: string[];
coin: string;
balance: string;
}
export interface RiskReserveAllV3 {
list: RiskReserveAllItemV3[];
}
export interface InstrumentV3 {
symbol: string;
category: 'SPOT' | 'MARGIN' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
baseCoin: string;
quoteCoin: string;
buyLimitPriceRatio: string;
sellLimitPriceRatio: string;
feeRateUpRatio: string;
minOrderQty: string;
maxOrderQty: string;
maxMarketOrderQty: string;
pricePrecision: string;
quantityPrecision: string;
quotePrecision: string;
minOrderAmount: string;
maxSymbolOrderNum: string;
maxProductOrderNum: string;
status: 'listed' | 'online' | 'limit_open' | 'limit_close' | 'offline' | 'restrictedAPI';
offTime: string;
limitOpenTime: string;
maintainTime: string;
areaSymbol?: string;
makerFeeRate?: string;
takerFeeRate?: string;
openCostUpRatio?: string;
priceMultiplier?: string;
quantityMultiplier?: string;
symbolType?: 'perpetual' | 'delivery';
maxPositionNum?: string;
deliveryTime?: string;
deliveryStartTime?: string;
deliveryPeriod?: string;
/** Launch time - Unix millisecond timestamp. Null for some margin pairs. */
launchTime?: string | null;
fundInterval?: string;
minLeverage?: string;
maxLeverage?: string;
isIsolatedBaseBorrowable?: 'YES' | 'NO';
isIsolatedQuotedBorrowable?: 'YES' | 'NO';
warningRiskRatio?: string;
liquidationRiskRatio?: string;
maxCrossedLeverage?: string;
maxIsolatedLeverage?: string;
userMinBorrow?: string;
}
export interface MarketFeeGroupLabelV3 {
weight: string;
label: string;
symbols: string[];
}
export interface MarketFeeGroupTierV3 {
level: string;
makerFeeRate: string;
}
export interface MarketFeeGroupV3 {
category: string;
group: string;
labelList: MarketFeeGroupLabelV3[];
tierList: MarketFeeGroupTierV3[];
}
export interface MarketScoreWeightV3 {
category: string;
label: string;
symbol: string;
requiredSpread: string;
minMakerVolume: string;
weight: string;
}
export interface OrderBookV3 {
a: string[][];
b: string[][];
ts: string;
}
export interface TickerV3 {
category: 'SPOT' | 'USDT-FUTURES' | 'COIN-FUTURES' | 'USDC-FUTURES';
symbol: string;
lastPrice: string;
openPrice24h: string;
highPrice24h: string;
lowPrice24h: string;
ask1Price: string;
bid1Price: string;
bid1Size: string;
ask1Size: string;
price24hPcnt: string;
volume24h: string;
turnover24h: string;
indexPrice?: string;
markPrice?: string;
fundingRate?: string;
openInterest?: string;
deliveryStartTime?: string;
deliveryTime?: string;
deliveryStatus?: string;
}
export interface ProofOfReservesV3 {
merkleRootHash: string;
totalReserveRatio: string;
list: {
coin: string;
userAssets: string;
platformAssets: string;
reserveRatio: string;
}[];
}
export interface IndexComponentV3 {
exchange: string;
spotPair: string;
equivalentPrice: string;
weight: string;
}
export interface IndexPriceComponentsV3 {
symbol: string;
componentList: IndexComponentV3[];
}