bitget-api
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -1,2 +0,2 @@ | ||
import { APIResponse, FuturesProductType, FuturesAccountBillRequest, FuturesBusinessBillRequest, NewFuturesOrder, NewBatchFuturesOrder, FuturesPagination, NewFuturesPlanOrder, ModifyFuturesPlanOrder, ModifyFuturesPlanOrderTPSL, NewFuturesPlanPositionTPSL, ModifyFuturesPlanStopOrder, CancelFuturesPlanTPSL, HistoricPlanOrderTPSLRequest, NewFuturesPlanStopOrder, FuturesAccount, FuturesSymbolRule, FuturesMarginMode, FuturesPosition, NewFuturesPlanTrailingStopOrder, VIPFeeRate, GetHistoricTradesParams, FuturesMarketTrade, FuturesPlanType, FuturesKlineInterval, FuturesHistoricPositions, ModifyFuturesOrder } from './types'; | ||
import { APIResponse, FuturesProductType, FuturesAccountBillRequest, FuturesBusinessBillRequest, NewFuturesOrder, NewBatchFuturesOrder, FuturesPagination, NewFuturesPlanOrder, ModifyFuturesPlanOrder, ModifyFuturesPlanOrderTPSL, NewFuturesPlanPositionTPSL, ModifyFuturesPlanStopOrder, CancelFuturesPlanTPSL, HistoricPlanOrderTPSLRequest, NewFuturesPlanStopOrder, FuturesAccount, FuturesSymbolRule, FuturesMarginMode, FuturesPosition, NewFuturesPlanTrailingStopOrder, VIPFeeRate, GetHistoricTradesParams, FuturesMarketTrade, FuturesPlanType, FuturesKlineInterval, FuturesHistoricPositions, ModifyFuturesOrder, FuturesCandleData } from './types'; | ||
import BaseRestClient from './util/BaseRestClient'; | ||
@@ -35,3 +35,3 @@ /** | ||
/** Get Candle Data */ | ||
getCandles(symbol: string, granularity: FuturesKlineInterval, startTime: string, endTime: string, limit?: string): Promise<any>; | ||
getCandles(symbol: string, granularity: FuturesKlineInterval, startTime: string, endTime: string, limit?: string, kLineType?: 'market' | 'mark' | 'index'): Promise<FuturesCandleData[]>; | ||
/** Get symbol index price */ | ||
@@ -140,4 +140,6 @@ getIndexPrice(symbol: string): Promise<APIResponse<any>>; | ||
modifyStopOrder(params: ModifyFuturesPlanStopOrder): Promise<APIResponse<any>>; | ||
/** Cancel Plan Order TPSL */ | ||
/** Cancel Plan Order (TPSL) */ | ||
cancelPlanOrderTPSL(params: CancelFuturesPlanTPSL): Promise<APIResponse<any>>; | ||
/** Cancel Symbol Plan Order (TPSL) */ | ||
cancelSymbolPlanOrders(symbol: string, planType: FuturesPlanType): Promise<APIResponse<any>>; | ||
/** Cancel All Trigger Order (TPSL) */ | ||
@@ -144,0 +146,0 @@ cancelAllPlanOrders(productType: FuturesProductType, planType: FuturesPlanType): Promise<APIResponse<any>>; |
@@ -59,3 +59,3 @@ "use strict"; | ||
/** Get Candle Data */ | ||
getCandles(symbol, granularity, startTime, endTime, limit) { | ||
getCandles(symbol, granularity, startTime, endTime, limit, kLineType) { | ||
return this.get('/api/mix/v1/market/candles', { | ||
@@ -66,2 +66,3 @@ symbol, | ||
endTime, | ||
kLineType, | ||
limit, | ||
@@ -352,6 +353,13 @@ }); | ||
} | ||
/** Cancel Plan Order TPSL */ | ||
/** Cancel Plan Order (TPSL) */ | ||
cancelPlanOrderTPSL(params) { | ||
return this.postPrivate('/api/mix/v1/plan/cancelPlan', params); | ||
} | ||
/** Cancel Symbol Plan Order (TPSL) */ | ||
cancelSymbolPlanOrders(symbol, planType) { | ||
return this.postPrivate('/api/mix/v1/plan/cancelSymbolPlan', { | ||
symbol, | ||
planType, | ||
}); | ||
} | ||
/** Cancel All Trigger Order (TPSL) */ | ||
@@ -358,0 +366,0 @@ cancelAllPlanOrders(productType, planType) { |
@@ -1,2 +0,2 @@ | ||
import { NewBatchSpotOrder, NewSpotOrder, NewWalletTransfer, Pagination, APIResponse, CoinBalance, SymbolRules, NewSpotSubTransfer, NewSpotWithdraw, CancelSpotOrderV2, BatchCancelSpotOrderV2, SpotOrderResult, NewSpotPlanOrder, ModifySpotPlanOrder, CancelSpotPlanOrderParams, GetSpotPlanOrdersParams, SpotPlanOrder, GetHistoricPlanOrdersParams, SpotMarketTrade, GetHistoricTradesParams, VIPFeeRate, SpotKlineInterval } from './types'; | ||
import { NewBatchSpotOrder, NewSpotOrder, NewWalletTransfer, Pagination, APIResponse, CoinBalance, SymbolRules, NewSpotSubTransfer, NewSpotWithdraw, CancelSpotOrderV2, BatchCancelSpotOrderV2, SpotOrderResult, NewSpotPlanOrder, ModifySpotPlanOrder, CancelSpotPlanOrderParams, GetSpotPlanOrdersParams, SpotPlanOrder, GetHistoricPlanOrdersParams, SpotMarketTrade, GetHistoricTradesParams, VIPFeeRate, SpotKlineInterval, SpotCandleData } from './types'; | ||
import BaseRestClient from './util/BaseRestClient'; | ||
@@ -43,3 +43,3 @@ /** | ||
/** Get Candle Data */ | ||
getCandles(symbol: string, period: SpotKlineInterval, pagination?: Pagination): Promise<APIResponse<any>>; | ||
getCandles(symbol: string, period: SpotKlineInterval, pagination?: Pagination): Promise<APIResponse<SpotCandleData[]>>; | ||
/** Get Depth */ | ||
@@ -46,0 +46,0 @@ getDepth(symbol: string, type: 'step0' | 'step1' | 'step2' | 'step3' | 'step4' | 'step5', limit?: string): Promise<APIResponse<any>>; |
@@ -156,1 +156,12 @@ import { OrderTimeInForce } from '../shared'; | ||
} | ||
/** | ||
* @typedef {string[6]} FuturesCandleData | ||
* @property {Array[0]} Timestamp in milliseconds | ||
* @property {Array[1]} Opening price | ||
* @property {Array[2]} Highest price | ||
* @property {Array[3]} Lowest price | ||
* @property {Array[4]} Closing price - Value of the latest candle stick might change | ||
* @property {Array[5]} Base currency trading volume | ||
* @property {Array[6]} Quote currency trading volume | ||
*/ | ||
export declare type FuturesCandleData = string[6]; |
import { OrderTimeInForce } from '../shared'; | ||
export declare type WalletType = 'spot' | 'mix_usdt' | 'mix_usd'; | ||
export declare type SpotKlineInterval = '1min' | '5min' | '15min' | '30min' | '1h' | '4h' | '6h' | '12h' | '1M' | '1W' | '1week' | '6Hutc' | '12Hutc' | '1Dutc' | '3Dutc' | '1Wutc' | '1Mutc'; | ||
export declare type SpotKlineInterval = '1min' | '5min' | '15min' | '30min' | '1h' | '4h' | '6h' | '12h' | '1day' | '3day' | '1week' | '1M' | '6Hutc' | '12Hutc' | '1Dutc' | '3Dutc' | '1Wutc' | '1Mutc'; | ||
export interface NewWalletTransfer { | ||
@@ -95,1 +95,11 @@ fromType: WalletType; | ||
} | ||
export interface SpotCandleData { | ||
open: string; | ||
high: string; | ||
low: string; | ||
close: string; | ||
quoteVol: string; | ||
baseVol: string; | ||
usdtVol: string; | ||
ts: string; | ||
} |
@@ -31,4 +31,10 @@ import { FuturesHoldMode, FuturesHoldSide, FuturesMarginMode } from '../request'; | ||
feeRateUpRatio: string; | ||
limitOpenTime: string; | ||
maintainTime: string; | ||
makerFeeRate: string; | ||
maxOrderNum: string; | ||
maxPositionNum: string; | ||
minTradeNum: string; | ||
minTradeUSDT: string; | ||
offTime: string; | ||
openCostUpRatio: string; | ||
@@ -42,2 +48,5 @@ priceEndStep: string; | ||
symbol: string; | ||
symbolName: string; | ||
symbolStatus: string; | ||
symbolType: string; | ||
takerFeeRate: string; | ||
@@ -44,0 +53,0 @@ volumePlace: string; |
{ | ||
"name": "bitget-api", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "Node.js & JavaScript SDK for Bitget REST APIs & WebSockets, with TypeScript & end-to-end tests.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
306257
5086