@yuants/vendor-binance 0.8.1 → 0.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/private-api.js +46 -1
- package/dist/api/private-api.js.map +1 -1
- package/dist/api/public-api.js +3 -5
- package/dist/api/public-api.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/public-data/interest_rate.js +82 -0
- package/dist/public-data/interest_rate.js.map +1 -0
- package/dist/public-data/ohlc.js +88 -0
- package/dist/public-data/ohlc.js.map +1 -0
- package/dist/{product.js → public-data/product.js} +1 -1
- package/dist/public-data/product.js.map +1 -0
- package/dist/{quote.js → public-data/quote.js} +53 -5
- package/dist/public-data/quote.js.map +1 -0
- package/dist/services/order-actions-with-credential.js +3 -1
- package/dist/services/order-actions-with-credential.js.map +1 -1
- package/dist/services/orders/modifyOrder.js +58 -0
- package/dist/services/orders/modifyOrder.js.map +1 -0
- package/lib/api/private-api.d.ts +97 -0
- package/lib/api/private-api.d.ts.map +1 -1
- package/lib/api/private-api.js +51 -1
- package/lib/api/private-api.js.map +1 -1
- package/lib/api/public-api.d.ts +11 -6
- package/lib/api/public-api.d.ts.map +1 -1
- package/lib/api/public-api.js +5 -7
- package/lib/api/public-api.js.map +1 -1
- package/lib/index.d.ts +4 -4
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/public-data/interest_rate.d.ts.map +1 -0
- package/lib/public-data/interest_rate.js +84 -0
- package/lib/public-data/interest_rate.js.map +1 -0
- package/lib/public-data/ohlc.d.ts +2 -0
- package/lib/public-data/ohlc.d.ts.map +1 -0
- package/lib/{interest_rate.js → public-data/ohlc.js} +55 -22
- package/lib/public-data/ohlc.js.map +1 -0
- package/lib/{product.d.ts.map → public-data/product.d.ts.map} +1 -1
- package/lib/{product.js → public-data/product.js} +1 -1
- package/lib/public-data/product.js.map +1 -0
- package/lib/{quote.d.ts.map → public-data/quote.d.ts.map} +1 -1
- package/lib/{quote.js → public-data/quote.js} +52 -4
- package/lib/public-data/quote.js.map +1 -0
- package/lib/services/order-actions-with-credential.js +3 -1
- package/lib/services/order-actions-with-credential.js.map +1 -1
- package/lib/services/orders/modifyOrder.d.ts +4 -0
- package/lib/services/orders/modifyOrder.d.ts.map +1 -0
- package/lib/services/orders/modifyOrder.js +62 -0
- package/lib/services/orders/modifyOrder.js.map +1 -0
- package/package.json +11 -11
- package/temp/package-deps.json +23 -21
- package/dist/interest_rate.js +0 -55
- package/dist/interest_rate.js.map +0 -1
- package/dist/product.js.map +0 -1
- package/dist/quote.js.map +0 -1
- package/lib/interest_rate.d.ts.map +0 -1
- package/lib/interest_rate.js.map +0 -1
- package/lib/product.js.map +0 -1
- package/lib/quote.js.map +0 -1
- /package/lib/{interest_rate.d.ts → public-data/interest_rate.d.ts} +0 -0
- /package/lib/{product.d.ts → public-data/product.d.ts} +0 -0
- /package/lib/{quote.d.ts → public-data/quote.d.ts} +0 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { isApiError } from '../../api/client';
|
|
2
|
+
import { postSpotOrderCancelReplace, putUmOrder } from '../../api/private-api';
|
|
3
|
+
import { decodeFutureSymbol, decodeSpotSymbol, deriveClientOrderId, mapOrderDirectionToSide, mapOrderTypeToOrdType, } from './order-utils';
|
|
4
|
+
const modifyUnifiedOrder = async (credential, order) => {
|
|
5
|
+
const symbol = decodeFutureSymbol(order.product_id);
|
|
6
|
+
const side = mapOrderDirectionToSide(order.order_direction);
|
|
7
|
+
const res = await putUmOrder(credential, {
|
|
8
|
+
symbol,
|
|
9
|
+
side,
|
|
10
|
+
orderId: order.order_id ? parseInt(order.order_id) : undefined,
|
|
11
|
+
// origClientOrderId: order.client_order_id, // TODO: support client_order_id
|
|
12
|
+
quantity: order.volume,
|
|
13
|
+
price: order.price,
|
|
14
|
+
});
|
|
15
|
+
if (isApiError(res)) {
|
|
16
|
+
throw new Error(`Binance modify unified order failed: ${res.code} ${res.msg}`);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
const modifySpotOrder = async (credential, order) => {
|
|
20
|
+
const symbol = decodeSpotSymbol(order.product_id);
|
|
21
|
+
const side = mapOrderDirectionToSide(order.order_direction);
|
|
22
|
+
const type = mapOrderTypeToOrdType(order.order_type);
|
|
23
|
+
const timeInForce = order.order_type === 'MAKER' ? 'GTX' : order.order_type === 'LIMIT' ? 'GTC' : undefined;
|
|
24
|
+
const params = {
|
|
25
|
+
symbol,
|
|
26
|
+
side,
|
|
27
|
+
type,
|
|
28
|
+
cancelReplaceMode: 'STOP_ON_FAILURE',
|
|
29
|
+
cancelOrderId: order.order_id ? parseInt(order.order_id) : undefined,
|
|
30
|
+
// cancelOrigClientOrderId: order.client_order_id, // TODO: support client_order_id
|
|
31
|
+
newClientOrderId: deriveClientOrderId(order),
|
|
32
|
+
quantity: order.volume,
|
|
33
|
+
};
|
|
34
|
+
if (type === 'LIMIT') {
|
|
35
|
+
if (order.price === undefined) {
|
|
36
|
+
throw new Error('Binance spot LIMIT order requires price');
|
|
37
|
+
}
|
|
38
|
+
params.price = order.price;
|
|
39
|
+
params.timeInForce = timeInForce;
|
|
40
|
+
}
|
|
41
|
+
if (order.price !== undefined && type === 'MARKET') {
|
|
42
|
+
params.price = order.price;
|
|
43
|
+
}
|
|
44
|
+
const res = await postSpotOrderCancelReplace(credential, params);
|
|
45
|
+
if (isApiError(res)) {
|
|
46
|
+
throw new Error(`Binance modify spot order failed: ${res.code} ${res.msg}`);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
export const modifyOrder = async (credential, order) => {
|
|
50
|
+
if (order.account_id.includes('/unified/')) {
|
|
51
|
+
return modifyUnifiedOrder(credential, order);
|
|
52
|
+
}
|
|
53
|
+
if (order.account_id.includes('/spot/')) {
|
|
54
|
+
return modifySpotOrder(credential, order);
|
|
55
|
+
}
|
|
56
|
+
throw new Error(`Unsupported account_id for modifyOrder: ${order.account_id}`);
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=modifyOrder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modifyOrder.js","sourceRoot":"","sources":["../../../src/services/orders/modifyOrder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAe,0BAA0B,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EACL,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAEvB,MAAM,kBAAkB,GAA6C,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;IAC/F,MAAM,MAAM,GAAG,kBAAkB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,uBAAuB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;IAE5D,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,UAAU,EAAE;QACvC,MAAM;QACN,IAAI;QACJ,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS;QAC9D,6EAA6E;QAC7E,QAAQ,EAAE,KAAK,CAAC,MAAM;QACtB,KAAK,EAAE,KAAK,CAAC,KAAK;KACnB,CAAC,CAAC;IACH,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE;QACnB,MAAM,IAAI,KAAK,CAAC,wCAAwC,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC;KAChF;AACH,CAAC,CAAC;AAEF,MAAM,eAAe,GAA6C,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;IAC5F,MAAM,MAAM,GAAG,gBAAgB,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAClD,MAAM,IAAI,GAAG,uBAAuB,C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AM,CAAC,MAAM,WAAW,GAA6C,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,EAAE;IAC/F,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE;QAC1C,OAAO,kBAAkB,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;KAC9C;IACD,IAAI,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QACvC,OAAO,eAAe,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;KAC3C;IACD,MAAM,IAAI,KAAK,CAAC,2CAA2C,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;AACjF,CAAC,CAAC","sourcesContent":["import { IActionHandlerOfModifyOrder } from '@yuants/data-order';\nimport { isApiError } from '../../api/client';\nimport { ICredential, postSpotOrderCancelReplace, putUmOrder } from '../../api/private-api';\nimport {\n decodeFutureSymbol,\n decodeSpotSymbol,\n deriveClientOrderId,\n mapOrderDirectionToSide,\n mapOrderTypeToOrdType,\n} from './order-utils';\n\nconst modifyUnifiedOrder: IActionHandlerOfModifyOrder<ICredential> = async (credential, order) => {\n const symbol = decodeFutureSymbol(order.product_id);\n const side = mapOrderDirectionToSide(order.order_direction);\n\n const res = await putUmOrder(credential, {\n symbol,\n side,\n orderId: order.order_id ? parseInt(order.order_id) : undefined,\n // origClientOrderId: order.client_order_id, // TODO: support client_order_id\n quantity: order.volume,\n price: order.price,\n });\n if (isApiError(res)) {\n throw new Error(`Binance modify unified order failed: ${res.code} ${res.msg}`);\n }\n};\n\nconst modifySpotOrder: IActionHandlerOfModifyOrder<ICredential> = async (credential, order) => {\n const symbol = decodeSpotSymbol(order.product_id);\n const side = mapOrderDirectionToSide(order.order_direction);\n const type = mapOrderTypeToOrdType(order.order_type);\n const timeInForce = order.order_type === 'MAKER' ? 'GTX' : order.order_type === 'LIMIT' ? 'GTC' : undefined;\n\n const params: Parameters<typeof postSpotOrderCancelReplace>[1] = {\n symbol,\n side,\n type,\n cancelReplaceMode: 'STOP_ON_FAILURE',\n cancelOrderId: order.order_id ? parseInt(order.order_id) : undefined,\n // cancelOrigClientOrderId: order.client_order_id, // TODO: support client_order_id\n newClientOrderId: deriveClientOrderId(order),\n quantity: order.volume,\n };\n\n if (type === 'LIMIT') {\n if (order.price === undefined) {\n throw new Error('Binance spot LIMIT order requires price');\n }\n params.price = order.price;\n params.timeInForce = timeInForce;\n }\n if (order.price !== undefined && type === 'MARKET') {\n params.price = order.price;\n }\n\n const res = await postSpotOrderCancelReplace(credential, params);\n if (isApiError(res)) {\n throw new Error(`Binance modify spot order failed: ${res.code} ${res.msg}`);\n }\n};\n\nexport const modifyOrder: IActionHandlerOfModifyOrder<ICredential> = async (credential, order) => {\n if (order.account_id.includes('/unified/')) {\n return modifyUnifiedOrder(credential, order);\n }\n if (order.account_id.includes('/spot/')) {\n return modifySpotOrder(credential, order);\n }\n throw new Error(`Unsupported account_id for modifyOrder: ${order.account_id}`);\n};\n"]}
|
package/lib/api/private-api.d.ts
CHANGED
|
@@ -474,4 +474,101 @@ export declare const getUMIncome: (credential: ICredential, params?: {
|
|
|
474
474
|
limit?: number;
|
|
475
475
|
timestamp?: number;
|
|
476
476
|
}) => Promise<IUMIncomeRecord[]>;
|
|
477
|
+
/**
|
|
478
|
+
* Cancel an Existing Order and Send a New Order (TRADE)
|
|
479
|
+
*
|
|
480
|
+
* 权重: 1
|
|
481
|
+
*
|
|
482
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E5%B9%B6%E9%87%8D%E6%96%B0%E4%B8%8B%E5%8D%95-trade
|
|
483
|
+
*/
|
|
484
|
+
export declare const postSpotOrderCancelReplace: (credential: ICredential, params: {
|
|
485
|
+
symbol: string;
|
|
486
|
+
side: string;
|
|
487
|
+
type: string;
|
|
488
|
+
cancelReplaceMode: string;
|
|
489
|
+
timeInForce?: string;
|
|
490
|
+
quantity?: number;
|
|
491
|
+
quoteOrderQty?: number;
|
|
492
|
+
price?: number;
|
|
493
|
+
cancelNewClientOrderId?: string;
|
|
494
|
+
cancelOrigClientOrderId?: string;
|
|
495
|
+
cancelOrderId?: number;
|
|
496
|
+
newClientOrderId?: string;
|
|
497
|
+
strategyId?: number;
|
|
498
|
+
strategyType?: number;
|
|
499
|
+
stopPrice?: number;
|
|
500
|
+
trailingDelta?: number;
|
|
501
|
+
icebergQty?: number;
|
|
502
|
+
newOrderRespType?: string;
|
|
503
|
+
selfTradePreventionMode?: string;
|
|
504
|
+
pegPriceType?: string;
|
|
505
|
+
pegOffsetValue?: number;
|
|
506
|
+
pegOffsetType?: string;
|
|
507
|
+
}) => Promise<ISpotNewOrderResponse | IApiError>;
|
|
508
|
+
/**
|
|
509
|
+
* Modify Order (TRADE)
|
|
510
|
+
*
|
|
511
|
+
* 权重: 1
|
|
512
|
+
*
|
|
513
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Modify-UM-Order
|
|
514
|
+
*/
|
|
515
|
+
export declare const putUmOrder: (credential: ICredential, params: {
|
|
516
|
+
orderId?: number;
|
|
517
|
+
origClientOrderId?: string;
|
|
518
|
+
symbol: string;
|
|
519
|
+
side: string;
|
|
520
|
+
quantity?: number;
|
|
521
|
+
price?: number;
|
|
522
|
+
priceMatch?: string;
|
|
523
|
+
recvWindow?: number;
|
|
524
|
+
timestamp?: number;
|
|
525
|
+
}) => Promise<IUnifiedUmOrderResponse | IApiError>;
|
|
526
|
+
export interface IMarginPair {
|
|
527
|
+
id: string;
|
|
528
|
+
symbol: string;
|
|
529
|
+
base: string;
|
|
530
|
+
quote: string;
|
|
531
|
+
isMarginTrade: boolean;
|
|
532
|
+
isBuyAllowed: boolean;
|
|
533
|
+
isSellAllowed: boolean;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* 获取所有全仓杠杆交易对(MARKET_DATA)
|
|
537
|
+
*
|
|
538
|
+
* 权重: 1
|
|
539
|
+
*
|
|
540
|
+
* https://developers.binance.com/docs/zh-CN/margin_trading/market-data/Get-All-Cross-Margin-Pairs
|
|
541
|
+
*/
|
|
542
|
+
export declare const getMarginAllPairs: (params?: {
|
|
543
|
+
symbol?: string;
|
|
544
|
+
}) => Promise<IMarginPair[]>;
|
|
545
|
+
/**
|
|
546
|
+
* Get a future hourly interest rate
|
|
547
|
+
*
|
|
548
|
+
* https://developers.binance.com/docs/zh-CN/margin_trading/borrow-and-repay/Get-a-future-hourly-interest-rate
|
|
549
|
+
*/
|
|
550
|
+
export declare const getMarginNextHourlyInterestRate: (params: {
|
|
551
|
+
assets: string;
|
|
552
|
+
isIsolated: boolean;
|
|
553
|
+
}) => Promise<{
|
|
554
|
+
asset: string;
|
|
555
|
+
nextHourlyInterestRate: string;
|
|
556
|
+
}[]>;
|
|
557
|
+
/**
|
|
558
|
+
* Query Margin Interest Rate History
|
|
559
|
+
*
|
|
560
|
+
* https://developers.binance.com/docs/zh-CN/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
|
561
|
+
*/
|
|
562
|
+
export declare const getMarginInterestRateHistory: (params: {
|
|
563
|
+
asset: string;
|
|
564
|
+
vipLevel?: number;
|
|
565
|
+
startTime?: number;
|
|
566
|
+
endTime?: number;
|
|
567
|
+
limit?: number;
|
|
568
|
+
}) => Promise<{
|
|
569
|
+
asset: string;
|
|
570
|
+
dailyInterestRate: string;
|
|
571
|
+
timestamp: number;
|
|
572
|
+
vipLevel: number;
|
|
573
|
+
}[]>;
|
|
477
574
|
//# sourceMappingURL=private-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-api.d.ts","sourceRoot":"","sources":["../../src/api/private-api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,CAAC;AAE5B,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,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EAAE,CAQrF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,+BAA+B,WAAY;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,OAAO,CAAC;CACrB,KAAG,QACF;IACE,KAAK,EAAE,MAAM,CAAC;IACd,sBAAsB,EAAE,MAAM,CAAC;CAChC,EAAE,CASJ,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,WAAY;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,KAAG,QACF;IACE,KAAK,EAAE,MAAM,CAAC;IACd,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,EAAE,CAWJ,CAAC"}
|
package/lib/api/private-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUMIncome = exports.deleteUmOrder = exports.postUmOrder = exports.getDepositHistory = exports.getWithdrawHistory = exports.postWithdraw = exports.getSubAccountList = exports.getDepositAddress = exports.postUnifiedAccountAutoCollection = exports.postAssetTransfer = exports.deleteSpotOrder = exports.postSpotOrder = exports.getSpotOpenOrders = exports.getSpotAccountInfo = exports.getUnifiedAccountBalance = exports.getUnifiedUmOpenOrders = exports.getUnifiedUmAccount = exports.getUnifiedAccountInfo = void 0;
|
|
3
|
+
exports.getMarginInterestRateHistory = exports.getMarginNextHourlyInterestRate = exports.getMarginAllPairs = exports.putUmOrder = exports.postSpotOrderCancelReplace = exports.getUMIncome = exports.deleteUmOrder = exports.postUmOrder = exports.getDepositHistory = exports.getWithdrawHistory = exports.postWithdraw = exports.getSubAccountList = exports.getDepositAddress = exports.postUnifiedAccountAutoCollection = exports.postAssetTransfer = exports.deleteSpotOrder = exports.postSpotOrder = exports.getSpotOpenOrders = exports.getSpotAccountInfo = exports.getUnifiedAccountBalance = exports.getUnifiedUmOpenOrders = exports.getUnifiedUmAccount = exports.getUnifiedAccountInfo = void 0;
|
|
4
4
|
const client_1 = require("./client");
|
|
5
5
|
/**
|
|
6
6
|
* 查询账户信息(USER_DATA)
|
|
@@ -180,4 +180,54 @@ exports.deleteUmOrder = deleteUmOrder;
|
|
|
180
180
|
*/
|
|
181
181
|
const getUMIncome = (credential, params) => (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/papi/v1/um/income', params);
|
|
182
182
|
exports.getUMIncome = getUMIncome;
|
|
183
|
+
/**
|
|
184
|
+
* Cancel an Existing Order and Send a New Order (TRADE)
|
|
185
|
+
*
|
|
186
|
+
* 权重: 1
|
|
187
|
+
*
|
|
188
|
+
* https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E5%B9%B6%E9%87%8D%E6%96%B0%E4%B8%8B%E5%8D%95-trade
|
|
189
|
+
*/
|
|
190
|
+
const postSpotOrderCancelReplace = (credential, params) => (0, client_1.requestPrivate)(credential, 'POST', 'https://api.binance.com/api/v3/order/cancelReplace', params);
|
|
191
|
+
exports.postSpotOrderCancelReplace = postSpotOrderCancelReplace;
|
|
192
|
+
/**
|
|
193
|
+
* Modify Order (TRADE)
|
|
194
|
+
*
|
|
195
|
+
* 权重: 1
|
|
196
|
+
*
|
|
197
|
+
* https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Modify-UM-Order
|
|
198
|
+
*/
|
|
199
|
+
const putUmOrder = (credential, params) => (0, client_1.requestPrivate)(credential, 'PUT', 'https://papi.binance.com/papi/v1/um/order', params);
|
|
200
|
+
exports.putUmOrder = putUmOrder;
|
|
201
|
+
/**
|
|
202
|
+
* 获取所有全仓杠杆交易对(MARKET_DATA)
|
|
203
|
+
*
|
|
204
|
+
* 权重: 1
|
|
205
|
+
*
|
|
206
|
+
* https://developers.binance.com/docs/zh-CN/margin_trading/market-data/Get-All-Cross-Margin-Pairs
|
|
207
|
+
*/
|
|
208
|
+
const getMarginAllPairs = (params) => {
|
|
209
|
+
const credential = (0, client_1.getDefaultCredential)();
|
|
210
|
+
return (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/margin/allPairs', params);
|
|
211
|
+
};
|
|
212
|
+
exports.getMarginAllPairs = getMarginAllPairs;
|
|
213
|
+
/**
|
|
214
|
+
* Get a future hourly interest rate
|
|
215
|
+
*
|
|
216
|
+
* https://developers.binance.com/docs/zh-CN/margin_trading/borrow-and-repay/Get-a-future-hourly-interest-rate
|
|
217
|
+
*/
|
|
218
|
+
const getMarginNextHourlyInterestRate = (params) => {
|
|
219
|
+
const credential = (0, client_1.getDefaultCredential)();
|
|
220
|
+
return (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/margin/next-hourly-interest-rate', params);
|
|
221
|
+
};
|
|
222
|
+
exports.getMarginNextHourlyInterestRate = getMarginNextHourlyInterestRate;
|
|
223
|
+
/**
|
|
224
|
+
* Query Margin Interest Rate History
|
|
225
|
+
*
|
|
226
|
+
* https://developers.binance.com/docs/zh-CN/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History
|
|
227
|
+
*/
|
|
228
|
+
const getMarginInterestRateHistory = (params) => {
|
|
229
|
+
const credential = (0, client_1.getDefaultCredential)();
|
|
230
|
+
return (0, client_1.requestPrivate)(credential, 'GET', 'https://api.binance.com/sapi/v1/margin/interestRateHistory', params);
|
|
231
|
+
};
|
|
232
|
+
exports.getMarginInterestRateHistory = getMarginInterestRateHistory;
|
|
183
233
|
//# sourceMappingURL=private-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-api.js","sourceRoot":"","sources":["../../src/api/private-api.ts"],"names":[],"mappings":";;;AAAA,qCAAkE;AAsOlE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B,GAAG,CAChC,UAAuB,EACvB,MAQC,EAC2B,EAAE,CAC9B,IAAA,uBAAc,EACZ,UAAU,EACV,KAAK,EACL,0DAA0D,EAC1D,MAAM,CACP,CAAC;AAjBS,QAAA,kBAAkB,sBAiB3B;AAEJ;;;;;;GAMG;AACI,MAAM,iBAAiB,GAAG,CAC/B,UAAuB,EACvB,MASC,EAC0B,EAAE,CAC7B,IAAA,uBAAc,EACZ,UAAU,EACV,KAAK,EACL,wDAAwD,EACxD,MAAM,CACP,CAAC;AAlBS,QAAA,iBAAiB,qBAkB1B;AAEJ;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,CACzB,UAAuB,EACvB,MAaC,EAC6C,EAAE,CAChD,IAAA,uBAAc,EACZ,UAAU,EACV,MAAM,EACN,2CAA2C,EAC3C,MAAM,CACP,CAAC;AAtBS,QAAA,WAAW,eAsBpB;AAEG,MAAM,aAAa,GAAG,CAC3B,UAAuB,EACvB,MAIC,EAC6C,EAAE,CAChD,IAAA,uBAAc,EACZ,UAAU,EACV,QAAQ,EACR,2CAA2C,EAC3C,MAAM,CACP,CAAC;AAbS,QAAA,aAAa,iBAatB;AAEJ;;;;;;GAMG;AACI,MAAM,WAAW,GAAG,CACzB,UAAuB,EACvB,MAQC,EAC2B,EAAE,CAC9B,IAAA,uBAAc,EAAoB,UAAU,EAAE,KAAK,EAAE,2CAA2C,EAAE,MAAM,CAAC,CAAC;AAZ/F,QAAA,WAAW,eAYoF","sourcesContent":["import { IApiError, ICredential, requestPrivate } from './client';\nexport type { ICredential };\n\nexport interface IUnifiedAccountInfo {\n uniMMR: string;\n accountEquity: string;\n actualEquity: string;\n accountInitialMargin: string;\n accountMaintMargin: string;\n accountStatus: string;\n virtualMaxWithdrawAmount: string;\n totalAvailableBalance: string;\n totalMarginOpenLoss: string;\n updateTime: number;\n}\n\nexport interface IUnifiedUmAsset {\n asset: string;\n crossWalletBalance: string;\n crossUnPnl: string;\n maintMargin: string;\n initialMargin: string;\n positionInitialMargin: string;\n openOrderInitialMargin: string;\n updateTime: number;\n}\n\nexport interface IUnifiedUmPosition {\n symbol: string;\n initialMargin: string;\n maintMargin: string;\n unrealizedProfit: string;\n positionInitialMargin: string;\n openOrderInitialMargin: string;\n leverage: string;\n entryPrice: string;\n maxNotional: string;\n bidNotional: string;\n askNotional: string;\n positionSide: string;\n positionAmt: string;\n updateTime: number;\n}\n\nexport interface IUnifiedUmAccount {\n assets: IUnifiedUmAsset[];\n positions: IUnifiedUmPosition[];\n}\n\nexport interface IUnifiedUmOpenOrder {\n avgPrice: string;\n clientOrderId: string;\n cumQuote: string;\n executedQty: string;\n orderId: number;\n origQty: string;\n origType: string;\n price: string;\n reduceOnly: boolean;\n side: string;\n positionSide: string;\n status: string;\n symbol: string;\n time: number;\n timeInForce: string;\n type: string;\n updateTime: number;\n selfTradePreventionMode: string;\n goodTillDate: number;\n}\n\nexport interface IUnifiedAccountBalanceEntry {\n asset: string;\n totalWalletBalance: string;\n crossMarginAsset: string;\n crossMarginBorrowed: string;\n crossMarginFree: string;\n crossMarginInterest: string;\n crossMarginLocked: string;\n umWalletBalance: string;\n umUnrealizedPNL: string;\n cmWalletBalance: string;\n cmUnrealizedPNL: string;\n updateTime: number;\n}\n\nexport interface ISpotAccountInfo {\n makerCommission: number;\n takerCommission: number;\n buyerCommission: number;\n sellerCommission: number;\n commissionRates: {\n maker: string;\n taker: string;\n buyer: string;\n seller: string;\n };\n canTrade: boolean;\n canWithdraw: boolean;\n canDeposit: boolean;\n brokered: boolean;\n requireSelfTradePrevention: boolean;\n preventSor: boolean;\n updateTime: number;\n balances: {\n asset: string;\n free: string;\n locked: string;\n }[];\n permissions: string[];\n uid: number;\n}\n\nexport interface ISpotOrder {\n symbol: string;\n orderId: number;\n orderListId: number;\n clientOrderId: string;\n price: string;\n origQty: string;\n executedQty: string;\n origQuoteOrderQty: string;\n cummulativeQuoteQty: string;\n status: string;\n timeInForce: string;\n type: string;\n side: string;\n stopPrice: string;\n icebergQty: string;\n time: number;\n updateTime: number;\n isWorking: boolean;\n}\n\nexport interface ISpotNewOrderResponse {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n transactTime: number;\n}\n\nexport interface IAssetTransferResponse {\n tranId: number;\n}\n\nexport interface IDepositAddress {\n address: string;\n coin: string;\n tag: string;\n url: string;\n}\n\nexport interface ISubAccountSummary {\n email: string;\n isFreeze: boolean;\n createTime: number;\n isManagedSubAccount: boolean;\n isAssetManagementSubAccount: boolean;\n}\n\nexport interface ISubAccountListResponse {\n subAccounts: ISubAccountSummary[];\n}\n\nexport interface IWithdrawRecord {\n id: string;\n amount: string;\n transactionFee: string;\n coin: string;\n status: number;\n address: string;\n txId: string;\n applyTime: Date;\n network: string;\n transferType: number;\n info: string;\n confirmNo: number;\n walletType: number;\n txKey: string;\n completeTime: Date;\n}\n\nexport interface IDepositRecord {\n id: string;\n amount: string;\n coin: string;\n network: string;\n status: number;\n address: string;\n addressTag: string;\n txId: string;\n insertTime: number;\n transferType: number;\n confirmTimes: string;\n unlockConfirm: number;\n walletType: number;\n}\n\nexport interface IUnifiedUmOrderResponse {\n clientOrderId: string;\n cumQty: string;\n cumQuote: string;\n executedQty: string;\n orderId: number;\n avgPrice: string;\n origQty: string;\n price: string;\n reduceOnly: boolean;\n side: string;\n positionSide: string;\n status: string;\n symbol: string;\n timeInForce: string;\n type: string;\n selfTradePreventionMode: string;\n goodTillDate: number;\n updateTime: number;\n}\n\nexport interface IUMIncomeRecord {\n symbol: string;\n incomeType: string;\n income: string;\n asset: string;\n info: string;\n time: number;\n tranId: string;\n tradeId: string;\n}\n\n/**\n * 查询账户信息(USER_DATA)\n *\n * 查询账户信息\n *\n * 权重: 20\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Information\n */\nexport const getUnifiedAccountInfo = (credential: ICredential): Promise<IUnifiedAccountInfo | IApiError> =>\n requestPrivate<IUnifiedAccountInfo | IApiError>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/account',\n );\n\n/**\n * 获取UM账户信息\n *\n * 现有UM账户资产和仓位信息\n *\n * 权重: 5\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Account-Detail\n */\nexport const getUnifiedUmAccount = (credential: ICredential): Promise<IUnifiedUmAccount | IApiError> =>\n requestPrivate<IUnifiedUmAccount | IApiError>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/um/account',\n );\n\n/**\n * 查看当前全部UM挂单(USER_DATA)\n *\n * 查看当前全部UM挂单,请小心使用不带symbol参数的调用\n *\n * 权重: 带symbol 1 - 不带 40\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders\n */\nexport const getUnifiedUmOpenOrders = (\n credential: ICredential,\n params?: {\n symbol?: string;\n },\n): Promise<IUnifiedUmOpenOrder[]> =>\n requestPrivate<IUnifiedUmOpenOrder[]>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/um/openOrders',\n params,\n );\n\n/**\n * 查询账户余额(USER_DATA)\n *\n * 查询账户余额\n *\n * 权重: 20\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Balance\n */\nexport const getUnifiedAccountBalance = (\n credential: ICredential,\n params?: {\n assets?: string;\n },\n): Promise<IUnifiedAccountBalanceEntry[] | IApiError> =>\n requestPrivate<IUnifiedAccountBalanceEntry[] | IApiError>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/balance',\n params,\n );\n\n/**\n * 账户信息 (USER_DATA)\n *\n * 权重: 20\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api#%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data\n */\nexport const getSpotAccountInfo = (\n credential: ICredential,\n params?: {\n omitZeroBalances?: boolean;\n },\n): Promise<ISpotAccountInfo | IApiError> =>\n requestPrivate<ISpotAccountInfo | IApiError>(\n credential,\n 'GET',\n 'https://api.binance.com/api/v3/account',\n params,\n );\n\n/**\n * Current open orders (USER_DATA)\n *\n * 权重: 带symbol: 6 不带: 80\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/account-endpoints#%E6%9F%A5%E7%9C%8B%E8%B4%A6%E6%88%B7%E5%BD%93%E5%89%8D%E6%8C%82%E5%8D%95-user_data\n */\nexport const getSpotOpenOrders = (\n credential: ICredential,\n params?: {\n symbol?: string;\n },\n): Promise<ISpotOrder[] | IApiError> =>\n requestPrivate<ISpotOrder[] | IApiError>(\n credential,\n 'GET',\n 'https://api.binance.com/api/v3/openOrders',\n params,\n );\n\n/**\n * New order (TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E4%B8%8B%E5%8D%95-trade\n */\nexport const postSpotOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n side: string;\n type: string;\n timeInForce?: string;\n quantity?: number;\n quoteOrderQty?: number;\n price?: number;\n newClientOrderId?: string;\n strategyId?: number;\n strategyType?: number;\n stopPrice?: number;\n trailingDelta?: number;\n icebergQty?: number;\n newOrderRespType?: string;\n selfTradePreventionMode?: string;\n pegPriceType?: string;\n pegOffsetValue?: number;\n pegOffsetType?: string;\n },\n): Promise<ISpotNewOrderResponse | IApiError> =>\n requestPrivate<ISpotNewOrderResponse | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/api/v3/order',\n params,\n );\n\n/**\n * Cancel order (TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E8%AE%A2%E5%8D%95-trade\n */\nexport const deleteSpotOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n orderId?: string | number;\n origClientOrderId?: string;\n newClientOrderId?: string;\n cancelRestrictions?: string;\n },\n): Promise<ISpotOrder | IApiError> =>\n requestPrivate<ISpotOrder | IApiError>(\n credential,\n 'DELETE',\n 'https://api.binance.com/api/v3/order',\n params,\n );\n\n/**\n * 用户万向划转(USER_DATA)\n *\n * 用户万向划转\n *\n * 您需要开通api key 允许万向划转权限来调用此接口。\n *\n * 权重: 900\n *\n * https://developers.binance.com/docs/zh-CN/wallet/asset/user-universal-transfer\n */\nexport const postAssetTransfer = (\n credential: ICredential,\n params: {\n type: string;\n asset: string;\n amount: number;\n fromSymbol?: string;\n toSymbol?: string;\n },\n): Promise<IAssetTransferResponse | IApiError> =>\n requestPrivate<IAssetTransferResponse | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/sapi/v1/asset/transfer',\n params,\n );\n\n/**\n * 统一账户资金归集(TRADE)\n *\n * 资金归集到统一账户钱包\n *\n * 权重: 750\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Fund-Auto-collection\n *\n * ISSUE(2024-07-18): 目前这是唯一能够将资金从原 U 本位合约账户转入统一账户的接口。\n */\nexport const postUnifiedAccountAutoCollection = (credential: ICredential): Promise<{ msg: string }> =>\n requestPrivate<{ msg: string }>(credential, 'POST', 'https://papi.binance.com/papi/v1/auto-collection');\n\n/**\n * 获取充值地址(支持多网络)(USER_DATA)\n *\n * 获取充值地址\n *\n * 权重: 10\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-address\n */\nexport const getDepositAddress = (\n credential: ICredential,\n params: {\n coin: string;\n network?: string;\n amount?: number;\n },\n): Promise<IDepositAddress> =>\n requestPrivate<IDepositAddress>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/capital/deposit/address',\n params,\n );\n\n/**\n * 查询子账户列表(适用主账户)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/sub_account/account-management/Query-Sub-account-List\n */\nexport const getSubAccountList = (\n credential: ICredential,\n params?: {\n email?: string;\n isFreeze?: number;\n page?: number;\n limit?: number;\n },\n): Promise<ISubAccountListResponse | IApiError> =>\n requestPrivate<ISubAccountListResponse | IApiError>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/sub-account/list',\n params,\n );\n\n/**\n * 提币(USER_DATA)\n *\n * 权重: 600\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw\n */\nexport const postWithdraw = (\n credential: ICredential,\n params: {\n coin: string;\n withdrawOrderId?: string;\n network?: string;\n address: string;\n addressTag?: string;\n amount: number;\n transactionFeeFlag?: boolean;\n name?: string;\n walletType?: number;\n },\n): Promise<{ id: string } | IApiError> =>\n requestPrivate<{ id: string } | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/sapi/v1/capital/withdraw/apply',\n params,\n );\n\n/**\n * 获取提币历史(支持多网络)(USER_DATA)\n *\n * 获取提币历史 (支持多网络)\n *\n * 请求权重(IP)#\n * 18000 请求限制: 每秒10次\n *\n * 本接口特别采用每秒UID速率限制,用户的总秒级 UID 速率限制为180000/秒。从该接口收到的响应包含key X-SAPI-USED-UID-WEIGHT-1S,该key定义了当前 UID 使用的权重\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw-history\n */\nexport const getWithdrawHistory = (\n credential: ICredential,\n params?: {\n coin?: string;\n withdrawOrderId?: string;\n status?: number;\n offset?: number;\n limit?: number;\n startTime?: number;\n endTime?: number;\n },\n): Promise<IWithdrawRecord[]> =>\n requestPrivate<IWithdrawRecord[]>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/capital/withdraw/history',\n params,\n );\n\n/**\n * 获取充值历史(支持多网络)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-history\n */\nexport const getDepositHistory = (\n credential: ICredential,\n params?: {\n includeSource?: boolean;\n coin?: string;\n status?: number;\n startTime?: number;\n endTime?: number;\n offset?: number;\n limit?: number;\n txId?: string;\n },\n): Promise<IDepositRecord[]> =>\n requestPrivate<IDepositRecord[]>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/capital/deposit/hisrec',\n params,\n );\n\n/**\n * UM下单(TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/New-UM-Order\n */\nexport const postUmOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n side: string;\n positionSide?: string;\n type: string;\n timeInForce?: string;\n quantity: number;\n reduceOnly?: string;\n price?: number;\n newClientOrderId?: string;\n newOrderRespType?: string;\n selfTradePreventionMode?: string;\n goodTillDate?: number;\n },\n): Promise<IUnifiedUmOrderResponse | IApiError> =>\n requestPrivate<IUnifiedUmOrderResponse | IApiError>(\n credential,\n 'POST',\n 'https://papi.binance.com/papi/v1/um/order',\n params,\n );\n\nexport const deleteUmOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n orderId?: string | number;\n origClientOrderId?: string;\n },\n): Promise<IUnifiedUmOrderResponse | IApiError> =>\n requestPrivate<IUnifiedUmOrderResponse | IApiError>(\n credential,\n 'DELETE',\n 'https://papi.binance.com/papi/v1/um/order',\n params,\n );\n\n/**\n * 获取UM损益资金流水(USER_DATA)\n *\n * 权重: 30\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Income-History\n */\nexport const getUMIncome = (\n credential: ICredential,\n params?: {\n symbol?: string;\n incomeType?: string;\n startTime?: number;\n endTime?: number;\n recvWindow?: number;\n limit?: number;\n timestamp?: number;\n },\n): Promise<IUMIncomeRecord[]> =>\n requestPrivate<IUMIncomeRecord[]>(credential, 'GET', 'https://api.binance.com/papi/v1/um/income', params);\n"]}
|
|
1
|
+
{"version":3,"file":"private-api.js","sourceRoot":"","sources":["../../src/api/private-api.ts"],"names":[],"mappings":";;;AAAA,qCAAwF;AAsOxF;;;;;;;;GAQG;AACI,MAAM,qBAAqB,GAAG,CAAC,UAAuB,EAA4C,EAAE,CACzG,IAAA,uBAAc,EACZ,UAAU,EACV,KAAK,EACL,0CAA0C,CAC3C,CAAC;AALS,QAAA,qBAAqB,yBAK9B;AAEJ;;;;;;;;GAQG;AACI,MAAM,mBAAmB,GAAG,CAAC,UAAuB,EAA0C,EAAE,CACrG,IAAA,uBAAc,EAC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;AACJ,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B;AAEF;;;;GAIG;AACI,MAAM,+BAA+B,GAAG,CAAC,MAG/C,EAKC,EAAE;IACF,MAAM,UAAU,GAAG,IAAA,6BAAoB,GAAE,CAAC;IAC1C,OAAO,IAAA,uBAAc,EAKnB,UAAU,EAAE,KAAK,EAAE,kEAAkE,EAAE,MAAM,CAAC,CAAC;AACnG,CAAC,CAAC;AAhBW,QAAA,+BAA+B,mCAgB1C;AAEF;;;;GAIG;AACI,MAAM,4BAA4B,GAAG,CAAC,MAM5C,EAOC,EAAE;IACF,MAAM,UAAU,GAAG,IAAA,6BAAoB,GAAE,CAAC;IAC1C,OAAO,IAAA,uBAAc,EAOnB,UAAU,EAAE,KAAK,EAAE,4DAA4D,EAAE,MAAM,CAAC,CAAC;AAC7F,CAAC,CAAC;AAvBW,QAAA,4BAA4B,gCAuBvC","sourcesContent":["import { getDefaultCredential, IApiError, ICredential, requestPrivate } from './client';\nexport type { ICredential };\n\nexport interface IUnifiedAccountInfo {\n uniMMR: string;\n accountEquity: string;\n actualEquity: string;\n accountInitialMargin: string;\n accountMaintMargin: string;\n accountStatus: string;\n virtualMaxWithdrawAmount: string;\n totalAvailableBalance: string;\n totalMarginOpenLoss: string;\n updateTime: number;\n}\n\nexport interface IUnifiedUmAsset {\n asset: string;\n crossWalletBalance: string;\n crossUnPnl: string;\n maintMargin: string;\n initialMargin: string;\n positionInitialMargin: string;\n openOrderInitialMargin: string;\n updateTime: number;\n}\n\nexport interface IUnifiedUmPosition {\n symbol: string;\n initialMargin: string;\n maintMargin: string;\n unrealizedProfit: string;\n positionInitialMargin: string;\n openOrderInitialMargin: string;\n leverage: string;\n entryPrice: string;\n maxNotional: string;\n bidNotional: string;\n askNotional: string;\n positionSide: string;\n positionAmt: string;\n updateTime: number;\n}\n\nexport interface IUnifiedUmAccount {\n assets: IUnifiedUmAsset[];\n positions: IUnifiedUmPosition[];\n}\n\nexport interface IUnifiedUmOpenOrder {\n avgPrice: string;\n clientOrderId: string;\n cumQuote: string;\n executedQty: string;\n orderId: number;\n origQty: string;\n origType: string;\n price: string;\n reduceOnly: boolean;\n side: string;\n positionSide: string;\n status: string;\n symbol: string;\n time: number;\n timeInForce: string;\n type: string;\n updateTime: number;\n selfTradePreventionMode: string;\n goodTillDate: number;\n}\n\nexport interface IUnifiedAccountBalanceEntry {\n asset: string;\n totalWalletBalance: string;\n crossMarginAsset: string;\n crossMarginBorrowed: string;\n crossMarginFree: string;\n crossMarginInterest: string;\n crossMarginLocked: string;\n umWalletBalance: string;\n umUnrealizedPNL: string;\n cmWalletBalance: string;\n cmUnrealizedPNL: string;\n updateTime: number;\n}\n\nexport interface ISpotAccountInfo {\n makerCommission: number;\n takerCommission: number;\n buyerCommission: number;\n sellerCommission: number;\n commissionRates: {\n maker: string;\n taker: string;\n buyer: string;\n seller: string;\n };\n canTrade: boolean;\n canWithdraw: boolean;\n canDeposit: boolean;\n brokered: boolean;\n requireSelfTradePrevention: boolean;\n preventSor: boolean;\n updateTime: number;\n balances: {\n asset: string;\n free: string;\n locked: string;\n }[];\n permissions: string[];\n uid: number;\n}\n\nexport interface ISpotOrder {\n symbol: string;\n orderId: number;\n orderListId: number;\n clientOrderId: string;\n price: string;\n origQty: string;\n executedQty: string;\n origQuoteOrderQty: string;\n cummulativeQuoteQty: string;\n status: string;\n timeInForce: string;\n type: string;\n side: string;\n stopPrice: string;\n icebergQty: string;\n time: number;\n updateTime: number;\n isWorking: boolean;\n}\n\nexport interface ISpotNewOrderResponse {\n symbol: string;\n orderId: number;\n clientOrderId: string;\n transactTime: number;\n}\n\nexport interface IAssetTransferResponse {\n tranId: number;\n}\n\nexport interface IDepositAddress {\n address: string;\n coin: string;\n tag: string;\n url: string;\n}\n\nexport interface ISubAccountSummary {\n email: string;\n isFreeze: boolean;\n createTime: number;\n isManagedSubAccount: boolean;\n isAssetManagementSubAccount: boolean;\n}\n\nexport interface ISubAccountListResponse {\n subAccounts: ISubAccountSummary[];\n}\n\nexport interface IWithdrawRecord {\n id: string;\n amount: string;\n transactionFee: string;\n coin: string;\n status: number;\n address: string;\n txId: string;\n applyTime: Date;\n network: string;\n transferType: number;\n info: string;\n confirmNo: number;\n walletType: number;\n txKey: string;\n completeTime: Date;\n}\n\nexport interface IDepositRecord {\n id: string;\n amount: string;\n coin: string;\n network: string;\n status: number;\n address: string;\n addressTag: string;\n txId: string;\n insertTime: number;\n transferType: number;\n confirmTimes: string;\n unlockConfirm: number;\n walletType: number;\n}\n\nexport interface IUnifiedUmOrderResponse {\n clientOrderId: string;\n cumQty: string;\n cumQuote: string;\n executedQty: string;\n orderId: number;\n avgPrice: string;\n origQty: string;\n price: string;\n reduceOnly: boolean;\n side: string;\n positionSide: string;\n status: string;\n symbol: string;\n timeInForce: string;\n type: string;\n selfTradePreventionMode: string;\n goodTillDate: number;\n updateTime: number;\n}\n\nexport interface IUMIncomeRecord {\n symbol: string;\n incomeType: string;\n income: string;\n asset: string;\n info: string;\n time: number;\n tranId: string;\n tradeId: string;\n}\n\n/**\n * 查询账户信息(USER_DATA)\n *\n * 查询账户信息\n *\n * 权重: 20\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Information\n */\nexport const getUnifiedAccountInfo = (credential: ICredential): Promise<IUnifiedAccountInfo | IApiError> =>\n requestPrivate<IUnifiedAccountInfo | IApiError>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/account',\n );\n\n/**\n * 获取UM账户信息\n *\n * 现有UM账户资产和仓位信息\n *\n * 权重: 5\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Account-Detail\n */\nexport const getUnifiedUmAccount = (credential: ICredential): Promise<IUnifiedUmAccount | IApiError> =>\n requestPrivate<IUnifiedUmAccount | IApiError>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/um/account',\n );\n\n/**\n * 查看当前全部UM挂单(USER_DATA)\n *\n * 查看当前全部UM挂单,请小心使用不带symbol参数的调用\n *\n * 权重: 带symbol 1 - 不带 40\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Query-All-Current-UM-Open-Orders\n */\nexport const getUnifiedUmOpenOrders = (\n credential: ICredential,\n params?: {\n symbol?: string;\n },\n): Promise<IUnifiedUmOpenOrder[]> =>\n requestPrivate<IUnifiedUmOpenOrder[]>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/um/openOrders',\n params,\n );\n\n/**\n * 查询账户余额(USER_DATA)\n *\n * 查询账户余额\n *\n * 权重: 20\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Account-Balance\n */\nexport const getUnifiedAccountBalance = (\n credential: ICredential,\n params?: {\n assets?: string;\n },\n): Promise<IUnifiedAccountBalanceEntry[] | IApiError> =>\n requestPrivate<IUnifiedAccountBalanceEntry[] | IApiError>(\n credential,\n 'GET',\n 'https://papi.binance.com/papi/v1/balance',\n params,\n );\n\n/**\n * 账户信息 (USER_DATA)\n *\n * 权重: 20\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api#%E8%B4%A6%E6%88%B7%E4%BF%A1%E6%81%AF-user_data\n */\nexport const getSpotAccountInfo = (\n credential: ICredential,\n params?: {\n omitZeroBalances?: boolean;\n },\n): Promise<ISpotAccountInfo | IApiError> =>\n requestPrivate<ISpotAccountInfo | IApiError>(\n credential,\n 'GET',\n 'https://api.binance.com/api/v3/account',\n params,\n );\n\n/**\n * Current open orders (USER_DATA)\n *\n * 权重: 带symbol: 6 不带: 80\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/account-endpoints#%E6%9F%A5%E7%9C%8B%E8%B4%A6%E6%88%B7%E5%BD%93%E5%89%8D%E6%8C%82%E5%8D%95-user_data\n */\nexport const getSpotOpenOrders = (\n credential: ICredential,\n params?: {\n symbol?: string;\n },\n): Promise<ISpotOrder[] | IApiError> =>\n requestPrivate<ISpotOrder[] | IApiError>(\n credential,\n 'GET',\n 'https://api.binance.com/api/v3/openOrders',\n params,\n );\n\n/**\n * New order (TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E4%B8%8B%E5%8D%95-trade\n */\nexport const postSpotOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n side: string;\n type: string;\n timeInForce?: string;\n quantity?: number;\n quoteOrderQty?: number;\n price?: number;\n newClientOrderId?: string;\n strategyId?: number;\n strategyType?: number;\n stopPrice?: number;\n trailingDelta?: number;\n icebergQty?: number;\n newOrderRespType?: string;\n selfTradePreventionMode?: string;\n pegPriceType?: string;\n pegOffsetValue?: number;\n pegOffsetType?: string;\n },\n): Promise<ISpotNewOrderResponse | IApiError> =>\n requestPrivate<ISpotNewOrderResponse | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/api/v3/order',\n params,\n );\n\n/**\n * Cancel order (TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E8%AE%A2%E5%8D%95-trade\n */\nexport const deleteSpotOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n orderId?: string | number;\n origClientOrderId?: string;\n newClientOrderId?: string;\n cancelRestrictions?: string;\n },\n): Promise<ISpotOrder | IApiError> =>\n requestPrivate<ISpotOrder | IApiError>(\n credential,\n 'DELETE',\n 'https://api.binance.com/api/v3/order',\n params,\n );\n\n/**\n * 用户万向划转(USER_DATA)\n *\n * 用户万向划转\n *\n * 您需要开通api key 允许万向划转权限来调用此接口。\n *\n * 权重: 900\n *\n * https://developers.binance.com/docs/zh-CN/wallet/asset/user-universal-transfer\n */\nexport const postAssetTransfer = (\n credential: ICredential,\n params: {\n type: string;\n asset: string;\n amount: number;\n fromSymbol?: string;\n toSymbol?: string;\n },\n): Promise<IAssetTransferResponse | IApiError> =>\n requestPrivate<IAssetTransferResponse | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/sapi/v1/asset/transfer',\n params,\n );\n\n/**\n * 统一账户资金归集(TRADE)\n *\n * 资金归集到统一账户钱包\n *\n * 权重: 750\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Fund-Auto-collection\n *\n * ISSUE(2024-07-18): 目前这是唯一能够将资金从原 U 本位合约账户转入统一账户的接口。\n */\nexport const postUnifiedAccountAutoCollection = (credential: ICredential): Promise<{ msg: string }> =>\n requestPrivate<{ msg: string }>(credential, 'POST', 'https://papi.binance.com/papi/v1/auto-collection');\n\n/**\n * 获取充值地址(支持多网络)(USER_DATA)\n *\n * 获取充值地址\n *\n * 权重: 10\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-address\n */\nexport const getDepositAddress = (\n credential: ICredential,\n params: {\n coin: string;\n network?: string;\n amount?: number;\n },\n): Promise<IDepositAddress> =>\n requestPrivate<IDepositAddress>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/capital/deposit/address',\n params,\n );\n\n/**\n * 查询子账户列表(适用主账户)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/sub_account/account-management/Query-Sub-account-List\n */\nexport const getSubAccountList = (\n credential: ICredential,\n params?: {\n email?: string;\n isFreeze?: number;\n page?: number;\n limit?: number;\n },\n): Promise<ISubAccountListResponse | IApiError> =>\n requestPrivate<ISubAccountListResponse | IApiError>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/sub-account/list',\n params,\n );\n\n/**\n * 提币(USER_DATA)\n *\n * 权重: 600\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw\n */\nexport const postWithdraw = (\n credential: ICredential,\n params: {\n coin: string;\n withdrawOrderId?: string;\n network?: string;\n address: string;\n addressTag?: string;\n amount: number;\n transactionFeeFlag?: boolean;\n name?: string;\n walletType?: number;\n },\n): Promise<{ id: string } | IApiError> =>\n requestPrivate<{ id: string } | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/sapi/v1/capital/withdraw/apply',\n params,\n );\n\n/**\n * 获取提币历史(支持多网络)(USER_DATA)\n *\n * 获取提币历史 (支持多网络)\n *\n * 请求权重(IP)#\n * 18000 请求限制: 每秒10次\n *\n * 本接口特别采用每秒UID速率限制,用户的总秒级 UID 速率限制为180000/秒。从该接口收到的响应包含key X-SAPI-USED-UID-WEIGHT-1S,该key定义了当前 UID 使用的权重\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/withdraw-history\n */\nexport const getWithdrawHistory = (\n credential: ICredential,\n params?: {\n coin?: string;\n withdrawOrderId?: string;\n status?: number;\n offset?: number;\n limit?: number;\n startTime?: number;\n endTime?: number;\n },\n): Promise<IWithdrawRecord[]> =>\n requestPrivate<IWithdrawRecord[]>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/capital/withdraw/history',\n params,\n );\n\n/**\n * 获取充值历史(支持多网络)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/wallet/capital/deposite-history\n */\nexport const getDepositHistory = (\n credential: ICredential,\n params?: {\n includeSource?: boolean;\n coin?: string;\n status?: number;\n startTime?: number;\n endTime?: number;\n offset?: number;\n limit?: number;\n txId?: string;\n },\n): Promise<IDepositRecord[]> =>\n requestPrivate<IDepositRecord[]>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/capital/deposit/hisrec',\n params,\n );\n\n/**\n * UM下单(TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/New-UM-Order\n */\nexport const postUmOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n side: string;\n positionSide?: string;\n type: string;\n timeInForce?: string;\n quantity: number;\n reduceOnly?: string;\n price?: number;\n newClientOrderId?: string;\n newOrderRespType?: string;\n selfTradePreventionMode?: string;\n goodTillDate?: number;\n },\n): Promise<IUnifiedUmOrderResponse | IApiError> =>\n requestPrivate<IUnifiedUmOrderResponse | IApiError>(\n credential,\n 'POST',\n 'https://papi.binance.com/papi/v1/um/order',\n params,\n );\n\nexport const deleteUmOrder = (\n credential: ICredential,\n params: {\n symbol: string;\n orderId?: string | number;\n origClientOrderId?: string;\n },\n): Promise<IUnifiedUmOrderResponse | IApiError> =>\n requestPrivate<IUnifiedUmOrderResponse | IApiError>(\n credential,\n 'DELETE',\n 'https://papi.binance.com/papi/v1/um/order',\n params,\n );\n\n/**\n * 获取UM损益资金流水(USER_DATA)\n *\n * 权重: 30\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/account/Get-UM-Income-History\n */\nexport const getUMIncome = (\n credential: ICredential,\n params?: {\n symbol?: string;\n incomeType?: string;\n startTime?: number;\n endTime?: number;\n recvWindow?: number;\n limit?: number;\n timestamp?: number;\n },\n): Promise<IUMIncomeRecord[]> =>\n requestPrivate<IUMIncomeRecord[]>(credential, 'GET', 'https://api.binance.com/papi/v1/um/income', params);\n\n/**\n * Cancel an Existing Order and Send a New Order (TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/binance-spot-api-docs/rest-api/trading-endpoints#%E6%92%A4%E9%94%80%E5%B9%B6%E9%87%8D%E6%96%B0%E4%B8%8B%E5%8D%95-trade\n */\nexport const postSpotOrderCancelReplace = (\n credential: ICredential,\n params: {\n symbol: string;\n side: string;\n type: string;\n cancelReplaceMode: string;\n timeInForce?: string;\n quantity?: number;\n quoteOrderQty?: number;\n price?: number;\n cancelNewClientOrderId?: string;\n cancelOrigClientOrderId?: string;\n cancelOrderId?: number;\n newClientOrderId?: string;\n strategyId?: number;\n strategyType?: number;\n stopPrice?: number;\n trailingDelta?: number;\n icebergQty?: number;\n newOrderRespType?: string;\n selfTradePreventionMode?: string;\n pegPriceType?: string;\n pegOffsetValue?: number;\n pegOffsetType?: string;\n },\n): Promise<ISpotNewOrderResponse | IApiError> =>\n requestPrivate<ISpotNewOrderResponse | IApiError>(\n credential,\n 'POST',\n 'https://api.binance.com/api/v3/order/cancelReplace',\n params,\n );\n\n/**\n * Modify Order (TRADE)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/portfolio-margin/trade/Modify-UM-Order\n */\nexport const putUmOrder = (\n credential: ICredential,\n params: {\n orderId?: number;\n origClientOrderId?: string;\n symbol: string;\n side: string;\n quantity?: number;\n price?: number;\n priceMatch?: string;\n recvWindow?: number;\n timestamp?: number;\n },\n): Promise<IUnifiedUmOrderResponse | IApiError> =>\n requestPrivate<IUnifiedUmOrderResponse | IApiError>(\n credential,\n 'PUT',\n 'https://papi.binance.com/papi/v1/um/order',\n params,\n );\nexport interface IMarginPair {\n id: string;\n symbol: string;\n base: string;\n quote: string;\n isMarginTrade: boolean;\n isBuyAllowed: boolean;\n isSellAllowed: boolean;\n}\n\n/**\n * 获取所有全仓杠杆交易对(MARKET_DATA)\n *\n * 权重: 1\n *\n * https://developers.binance.com/docs/zh-CN/margin_trading/market-data/Get-All-Cross-Margin-Pairs\n */\nexport const getMarginAllPairs = (params?: { symbol?: string }): Promise<IMarginPair[]> => {\n const credential = getDefaultCredential();\n return requestPrivate<IMarginPair[]>(\n credential,\n 'GET',\n 'https://api.binance.com/sapi/v1/margin/allPairs',\n params,\n );\n};\n\n/**\n * Get a future hourly interest rate\n *\n * https://developers.binance.com/docs/zh-CN/margin_trading/borrow-and-repay/Get-a-future-hourly-interest-rate\n */\nexport const getMarginNextHourlyInterestRate = (params: {\n assets: string;\n isIsolated: boolean;\n}): Promise<\n {\n asset: string;\n nextHourlyInterestRate: string;\n }[]\n> => {\n const credential = getDefaultCredential();\n return requestPrivate<\n {\n asset: string;\n nextHourlyInterestRate: string;\n }[]\n >(credential, 'GET', 'https://api.binance.com/sapi/v1/margin/next-hourly-interest-rate', params);\n};\n\n/**\n * Query Margin Interest Rate History\n *\n * https://developers.binance.com/docs/zh-CN/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History\n */\nexport const getMarginInterestRateHistory = (params: {\n asset: string;\n vipLevel?: number;\n startTime?: number;\n endTime?: number;\n limit?: number;\n}): Promise<\n {\n asset: string;\n dailyInterestRate: string;\n timestamp: number;\n vipLevel: number;\n }[]\n> => {\n const credential = getDefaultCredential();\n return requestPrivate<\n {\n asset: string;\n dailyInterestRate: string;\n timestamp: number;\n vipLevel: number;\n }[]\n >(credential, 'GET', 'https://api.binance.com/sapi/v1/margin/interestRateHistory', params);\n};\n"]}
|
package/lib/api/public-api.d.ts
CHANGED
|
@@ -137,14 +137,19 @@ export declare const getFutureBookTicker: (params?: {
|
|
|
137
137
|
export declare const getFutureOpenInterest: (params: {
|
|
138
138
|
symbol: string;
|
|
139
139
|
}) => Promise<IFutureOpenInterest>;
|
|
140
|
+
export interface ISpotBookTickerEntry {
|
|
141
|
+
symbol: string;
|
|
142
|
+
bidPrice: string;
|
|
143
|
+
bidQty: string;
|
|
144
|
+
askPrice: string;
|
|
145
|
+
askQty: string;
|
|
146
|
+
}
|
|
140
147
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
143
|
-
* 权重: 1
|
|
148
|
+
* 当前最优挂单 (Spot)
|
|
144
149
|
*
|
|
145
|
-
* https://
|
|
150
|
+
* https://binance-docs.github.io/apidocs/spot/cn/#5393cd0851
|
|
146
151
|
*/
|
|
147
|
-
export declare const
|
|
152
|
+
export declare const getSpotBookTicker: (params?: {
|
|
148
153
|
symbol?: string;
|
|
149
|
-
}) => Promise<
|
|
154
|
+
}) => Promise<ISpotBookTickerEntry[]>;
|
|
150
155
|
//# sourceMappingURL=public-api.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../src/api/public-api.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,qBAAsB,SAAQ,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAClG,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,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B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,YAAa;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAAG,QAAQ,oBAAoB,EAAE,CACW,CAAC"}
|
package/lib/api/public-api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getSpotBookTicker = exports.getFutureOpenInterest = exports.getFutureBookTicker = exports.getFuturePremiumIndex = exports.getFutureFundingRate = exports.getFutureExchangeInfo = void 0;
|
|
4
4
|
const client_1 = require("./client");
|
|
5
5
|
/**
|
|
6
6
|
* 获取交易规则和交易对
|
|
@@ -50,12 +50,10 @@ exports.getFutureBookTicker = getFutureBookTicker;
|
|
|
50
50
|
const getFutureOpenInterest = (params) => (0, client_1.requestPublic)('GET', 'https://fapi.binance.com/fapi/v1/openInterest', params);
|
|
51
51
|
exports.getFutureOpenInterest = getFutureOpenInterest;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* 当前最优挂单 (Spot)
|
|
54
54
|
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* https://developers.binance.com/docs/zh-CN/margin_trading/market-data/Get-All-Cross-Margin-Pairs
|
|
55
|
+
* https://binance-docs.github.io/apidocs/spot/cn/#5393cd0851
|
|
58
56
|
*/
|
|
59
|
-
const
|
|
60
|
-
exports.
|
|
57
|
+
const getSpotBookTicker = (params) => (0, client_1.requestPublic)('GET', 'https://api.binance.com/api/v3/ticker/bookTicker', params);
|
|
58
|
+
exports.getSpotBookTicker = getSpotBookTicker;
|
|
61
59
|
//# sourceMappingURL=public-api.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../src/api/public-api.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AAgGzC;;;;GAIG;AACI,MAAM,qBAAqB,GAAG,GAAiC,EAAE,CACtE,IAAA,sBAAa,EAAsB,KAAK,EAAE,+CAA+C,CAAC,CAAC;AADhF,QAAA,qBAAqB,yBAC2D;AAE7F;;;;GAIG;AACI,MAAM,oBAAoB,GAAG,CAAC,MAKpC,EAAsC,EAAE,CACvC,IAAA,sBAAa,EAA4B,KAAK,EAAE,8CAA8C,EAAE,MAAM,CAAC,CAAC;AAN7F,QAAA,oBAAoB,wBAMyE;AAE1G;;;;;;;;GAQG;AACI,MAAM,qBAAqB,GAAG,CAAC,MAA2B,EAAuC,EAAE,CACxG,IAAA,sBAAa,EAA6B,KAAK,EAAE,+CAA+C,EAAE,MAAM,CAAC,CAAC;AAD/F,QAAA,qBAAqB,yBAC0E;AAE5G;;;;;;;;GAQG;AACI,MAAM,mBAAmB,GAAG,CAAC,MAA4B,EAAqC,EAAE,CACrG,IAAA,sBAAa,EACX,KAAK,EACL,oDAAoD,EACpD,MAAM,CACP,CAAC;AALS,QAAA,mBAAmB,uBAK5B;AAEJ;;;;;;;;GAQG;AACI,MAAM,qBAAqB,GAAG,CAAC,MAA0B,EAAgC,EAAE,CAChG,IAAA,sBAAa,EAAsB,KAAK,EAAE,+CAA+C,EAAE,MAAM,CAAC,CAAC;AADxF,QAAA,qBAAqB,yBACmE;
|
|
1
|
+
{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../src/api/public-api.ts"],"names":[],"mappings":";;;AAAA,qCAAyC;AAgGzC;;;;GAIG;AACI,MAAM,qBAAqB,GAAG,GAAiC,EAAE,CACtE,IAAA,sBAAa,EAAsB,KAAK,EAAE,+CAA+C,CAAC,CAAC;AADhF,QAAA,qBAAqB,yBAC2D;AAE7F;;;;GAIG;AACI,MAAM,oBAAoB,GAAG,CAAC,MAKpC,EAAsC,EAAE,CACvC,IAAA,sBAAa,EAA4B,KAAK,EAAE,8CAA8C,EAAE,MAAM,CAAC,CAAC;AAN7F,QAAA,oBAAoB,wBAMyE;AAE1G;;;;;;;;GAQG;AACI,MAAM,qBAAqB,GAAG,CAAC,MAA2B,EAAuC,EAAE,CACxG,IAAA,sBAAa,EAA6B,KAAK,EAAE,+CAA+C,EAAE,MAAM,CAAC,CAAC;AAD/F,QAAA,qBAAqB,yBAC0E;AAE5G;;;;;;;;GAQG;AACI,MAAM,mBAAmB,GAAG,CAAC,MAA4B,EAAqC,EAAE,CACrG,IAAA,sBAAa,EACX,KAAK,EACL,oDAAoD,EACpD,MAAM,CACP,CAAC;AALS,QAAA,mBAAmB,uBAK5B;AAEJ;;;;;;;;GAQG;AACI,MAAM,qBAAqB,GAAG,CAAC,MAA0B,EAAgC,EAAE,CAChG,IAAA,sBAAa,EAAsB,KAAK,EAAE,+CAA+C,EAAE,MAAM,CAAC,CAAC;AADxF,QAAA,qBAAqB,yBACmE;AASrG;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,CAAC,MAA4B,EAAmC,EAAE,CACjG,IAAA,sBAAa,EAAyB,KAAK,EAAE,kDAAkD,EAAE,MAAM,CAAC,CAAC;AAD9F,QAAA,iBAAiB,qBAC6E","sourcesContent":["import { requestPublic } from './client';\n\nexport interface IFutureExchangeFilter extends Record<string, string | number | boolean | undefined> {\n filterType: string;\n}\n\nexport interface IFutureExchangeSymbol {\n symbol: string;\n pair: string;\n contractType: string;\n deliveryDate: number;\n onboardDate: number;\n status: string;\n maintMarginPercent: string;\n requiredMarginPercent: string;\n baseAsset: string;\n quoteAsset: string;\n marginAsset: string;\n pricePrecision: number;\n quantityPrecision: number;\n baseAssetPrecision: number;\n quotePrecision: number;\n underlyingType: string;\n underlyingSubType: string[];\n settlePlan: number;\n triggerProtect: string;\n liquidationFee: string;\n marketTakeBound: string;\n maxMoveOrderLimit: number;\n filters: IFutureExchangeFilter[];\n orderTypes: string[];\n timeInForce: string[];\n}\n\nexport interface IFutureExchangeInfo {\n timezone: string;\n serverTime: number;\n futuresType: string;\n rateLimits: {\n rateLimitType: string;\n interval: string;\n intervalNum: number;\n limit: number;\n }[];\n exchangeFilters: unknown[];\n assets: {\n asset: string;\n marginAvailable: boolean;\n autoAssetExchange: string;\n }[];\n symbols: IFutureExchangeSymbol[];\n}\n\nexport interface IFutureFundingRateEntry {\n symbol: string;\n fundingTime: number;\n fundingRate: string;\n markPrice: string;\n}\n\nexport interface IFuturePremiumIndexEntry {\n symbol: string;\n markPrice: string;\n indexPrice: string;\n estimatedSettlePrice: string;\n lastFundingRate: string;\n interestRate: string;\n nextFundingTime: number;\n time: number;\n}\n\nexport interface IFutureBookTickerEntry {\n symbol: string;\n bidPrice: string;\n bidQty: string;\n askPrice: string;\n askQty: string;\n time: number;\n}\n\nexport interface IFutureOpenInterest {\n openInterest: string;\n symbol: string;\n time: number;\n}\n\nexport interface IMarginPair {\n id: string;\n symbol: string;\n base: string;\n quote: string;\n isMarginTrade: boolean;\n isBuyAllowed: boolean;\n isSellAllowed: boolean;\n}\n\n/**\n * 获取交易规则和交易对\n *\n * https://binance-docs.github.io/apidocs/futures/cn/#0f3f2d5ee7\n */\nexport const getFutureExchangeInfo = (): Promise<IFutureExchangeInfo> =>\n requestPublic<IFutureExchangeInfo>('GET', 'https://fapi.binance.com/fapi/v1/exchangeInfo');\n\n/**\n * 查询资金费率历史\n *\n * https://binance-docs.github.io/apidocs/futures/cn/#31dbeb24c4\n */\nexport const getFutureFundingRate = (params: {\n symbol?: string;\n startTime?: number;\n endTime?: number;\n limit?: number;\n}): Promise<IFutureFundingRateEntry[]> =>\n requestPublic<IFutureFundingRateEntry[]>('GET', 'https://fapi.binance.com/fapi/v1/fundingRate', params);\n\n/**\n * 最新标记价格和资金费率\n *\n * 采集各大交易所数据加权平均\n *\n * 权重: 带symbol为1;不带symbol为10\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price\n */\nexport const getFuturePremiumIndex = (params: { symbol?: string }): Promise<IFuturePremiumIndexEntry[]> =>\n requestPublic<IFuturePremiumIndexEntry[]>('GET', 'https://fapi.binance.com/fapi/v1/premiumIndex', params);\n\n/**\n * 当前最优挂单\n *\n * 返回当前最优的挂单(最高买单,最低卖单)\n *\n * 权重: 单交易对2,无交易对5\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Symbol-Order-Book-Ticker\n */\nexport const getFutureBookTicker = (params?: { symbol?: string }): Promise<IFutureBookTickerEntry[]> =>\n requestPublic<IFutureBookTickerEntry[]>(\n 'GET',\n 'https://fapi.binance.com/fapi/v1/ticker/bookTicker',\n params,\n );\n\n/**\n * 获取未平仓合约数\n *\n * 权重: 1\n *\n * 更新速率: 3s\n *\n * https://developers.binance.com/docs/zh-CN/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest\n */\nexport const getFutureOpenInterest = (params: { symbol: string }): Promise<IFutureOpenInterest> =>\n requestPublic<IFutureOpenInterest>('GET', 'https://fapi.binance.com/fapi/v1/openInterest', params);\nexport interface ISpotBookTickerEntry {\n symbol: string;\n bidPrice: string;\n bidQty: string;\n askPrice: string;\n askQty: string;\n}\n\n/**\n * 当前最优挂单 (Spot)\n *\n * https://binance-docs.github.io/apidocs/spot/cn/#5393cd0851\n */\nexport const getSpotBookTicker = (params?: { symbol?: string }): Promise<ISpotBookTickerEntry[]> =>\n requestPublic<ISpotBookTickerEntry[]>('GET', 'https://api.binance.com/api/v3/ticker/bookTicker', params);\n"]}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import './interest_rate';
|
|
2
|
-
import './
|
|
3
|
-
import './
|
|
4
|
-
import './
|
|
1
|
+
import './public-data/interest_rate';
|
|
2
|
+
import './public-data/ohlc';
|
|
3
|
+
import './public-data/product';
|
|
4
|
+
import './public-data/quote';
|
|
5
5
|
import './services/account-actions-with-credential';
|
|
6
6
|
import './services/order-actions-with-credential';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAC;AACrC,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,4CAA4C,CAAC;AACpD,OAAO,0CAA0C,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
require("./interest_rate");
|
|
4
|
-
require("./
|
|
5
|
-
require("./
|
|
6
|
-
require("./
|
|
3
|
+
require("./public-data/interest_rate");
|
|
4
|
+
require("./public-data/ohlc");
|
|
5
|
+
require("./public-data/product");
|
|
6
|
+
require("./public-data/quote");
|
|
7
7
|
require("./services/account-actions-with-credential");
|
|
8
8
|
require("./services/order-actions-with-credential");
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,uCAAqC;AACrC,8BAA4B;AAC5B,iCAA+B;AAC/B,+BAA6B;AAC7B,sDAAoD;AACpD,oDAAkD","sourcesContent":["import './public-data/interest_rate';\nimport './public-data/ohlc';\nimport './public-data/product';\nimport './public-data/quote';\nimport './services/account-actions-with-credential';\nimport './services/order-actions-with-credential';\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"interest_rate.d.ts","sourceRoot":"","sources":["../../src/public-data/interest_rate.ts"],"names":[],"mappings":""}
|