Skip to content

Commit

Permalink
release 5.34.0
Browse files Browse the repository at this point in the history
  • Loading branch information
revilwang committed Dec 3, 2022
1 parent 7123da2 commit eed01d4
Show file tree
Hide file tree
Showing 80 changed files with 3,006 additions and 394 deletions.
44 changes: 35 additions & 9 deletions README.md

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion api/apis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,21 @@ export * from './optionsApi';
import { OptionsApi } from './optionsApi';
export * from './spotApi';
import { SpotApi } from './spotApi';
export * from './subAccountApi';
import { SubAccountApi } from './subAccountApi';
export * from './walletApi';
import { WalletApi } from './walletApi';
export * from './withdrawalApi';
import { WithdrawalApi } from './withdrawalApi';

export const APIS = [DeliveryApi, FlashSwapApi, FuturesApi, MarginApi, OptionsApi, SpotApi, WalletApi, WithdrawalApi];
export const APIS = [
DeliveryApi,
FlashSwapApi,
FuturesApi,
MarginApi,
OptionsApi,
SpotApi,
SubAccountApi,
WalletApi,
WithdrawalApi,
];
48 changes: 24 additions & 24 deletions api/deliveryApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export class DeliveryApi {
* @param settle Settle currency
*/
public async listDeliveryContracts(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
): Promise<{ response: AxiosResponse; body: Array<DeliveryContract> }> {
const localVarPath =
this.client.basePath +
Expand Down Expand Up @@ -89,7 +89,7 @@ export class DeliveryApi {
* @param contract Futures contract
*/
public async getDeliveryContract(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
): Promise<{ response: AxiosResponse; body: DeliveryContract }> {
const localVarPath =
Expand Down Expand Up @@ -139,7 +139,7 @@ export class DeliveryApi {
* @param opts.withId Whether the order book update ID will be returned. This ID increases by 1 on every order book update
*/
public async listDeliveryOrderBook(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
opts: { interval?: '0' | '0.1' | '0.01'; limit?: number; withId?: boolean },
): Promise<{ response: AxiosResponse; body: FuturesOrderBook }> {
Expand Down Expand Up @@ -204,7 +204,7 @@ export class DeliveryApi {
* @param opts.to Specify end time in Unix seconds, default to current time
*/
public async listDeliveryTrades(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
opts: { limit?: number; lastId?: string; from?: number; to?: number },
): Promise<{ response: AxiosResponse; body: Array<FuturesTrade> }> {
Expand Down Expand Up @@ -273,7 +273,7 @@ export class DeliveryApi {
* @param opts.interval Interval time between data points. Note that &#x60;1w&#x60; means natual week(Mon-Sun), while &#x60;7d&#x60; means every 7d since unix 0
*/
public async listDeliveryCandlesticks(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
opts: {
from?: number;
Expand Down Expand Up @@ -362,7 +362,7 @@ export class DeliveryApi {
* @param opts.contract Futures contract
*/
public async listDeliveryTickers(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: { contract?: string },
): Promise<{ response: AxiosResponse; body: Array<FuturesTicker> }> {
const localVarPath =
Expand Down Expand Up @@ -407,7 +407,7 @@ export class DeliveryApi {
* @param opts.limit Maximum number of records to be returned in a single list
*/
public async listDeliveryInsuranceLedger(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: { limit?: number },
): Promise<{ response: AxiosResponse; body: Array<InsuranceRecord> }> {
const localVarPath =
Expand Down Expand Up @@ -452,7 +452,7 @@ export class DeliveryApi {
* @param settle Settle currency
*/
public async listDeliveryAccounts(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
): Promise<{ response: AxiosResponse; body: FuturesAccount }> {
const localVarPath =
this.client.basePath +
Expand Down Expand Up @@ -494,7 +494,7 @@ export class DeliveryApi {
* @param opts.type Changing Type: - dnw: Deposit &amp; Withdraw - pnl: Profit &amp; Loss by reducing position - fee: Trading fee - refr: Referrer rebate - fund: Funding - point_dnw: POINT Deposit &amp; Withdraw - point_fee: POINT Trading fee - point_refr: POINT Referrer rebate
*/
public async listDeliveryAccountBook(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: {
limit?: number;
from?: number;
Expand Down Expand Up @@ -557,7 +557,7 @@ export class DeliveryApi {
* @param settle Settle currency
*/
public async listDeliveryPositions(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
): Promise<{ response: AxiosResponse; body: Array<Position> }> {
const localVarPath =
this.client.basePath +
Expand Down Expand Up @@ -595,7 +595,7 @@ export class DeliveryApi {
* @param contract Futures contract
*/
public async getDeliveryPosition(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
): Promise<{ response: AxiosResponse; body: Position }> {
const localVarPath =
Expand Down Expand Up @@ -642,7 +642,7 @@ export class DeliveryApi {
* @param change Margin change. Use positive number to increase margin, negative number otherwise.
*/
public async updateDeliveryPositionMargin(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
change: string,
): Promise<{ response: AxiosResponse; body: Position }> {
Expand Down Expand Up @@ -703,7 +703,7 @@ export class DeliveryApi {
* @param leverage New position leverage
*/
public async updateDeliveryPositionLeverage(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
leverage: string,
): Promise<{ response: AxiosResponse; body: Position }> {
Expand Down Expand Up @@ -764,7 +764,7 @@ export class DeliveryApi {
* @param riskLimit New position risk limit
*/
public async updateDeliveryPositionRiskLimit(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
riskLimit: string,
): Promise<{ response: AxiosResponse; body: Position }> {
Expand Down Expand Up @@ -830,7 +830,7 @@ export class DeliveryApi {
* @param opts.countTotal Whether to return total number matched. Default to 0(no return)
*/
public async listDeliveryOrders(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
status: 'open' | 'finished',
opts: { contract?: string; limit?: number; offset?: number; lastId?: string; countTotal?: 0 | 1 },
): Promise<{ response: AxiosResponse; body: Array<FuturesOrder> }> {
Expand Down Expand Up @@ -898,7 +898,7 @@ export class DeliveryApi {
* @param futuresOrder
*/
public async createDeliveryOrder(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
futuresOrder: FuturesOrder,
): Promise<{ response: AxiosResponse; body: FuturesOrder }> {
const localVarPath =
Expand Down Expand Up @@ -945,7 +945,7 @@ export class DeliveryApi {
* @param opts.side All bids or asks. Both included if not specified
*/
public async cancelDeliveryOrders(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
contract: string,
opts: { side?: 'ask' | 'bid' },
): Promise<{ response: AxiosResponse; body: Array<FuturesOrder> }> {
Expand Down Expand Up @@ -997,7 +997,7 @@ export class DeliveryApi {
* @param orderId Retrieve the data of the order with the specified ID
*/
public async getDeliveryOrder(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
orderId: string,
): Promise<{ response: AxiosResponse; body: FuturesOrder }> {
const localVarPath =
Expand Down Expand Up @@ -1043,7 +1043,7 @@ export class DeliveryApi {
* @param orderId Retrieve the data of the order with the specified ID
*/
public async cancelDeliveryOrder(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
orderId: string,
): Promise<{ response: AxiosResponse; body: FuturesOrder }> {
const localVarPath =
Expand Down Expand Up @@ -1095,7 +1095,7 @@ export class DeliveryApi {
* @param opts.countTotal Whether to return total number matched. Default to 0(no return)
*/
public async getMyDeliveryTrades(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: {
contract?: string;
order?: number;
Expand Down Expand Up @@ -1168,7 +1168,7 @@ export class DeliveryApi {
* @param opts.limit Maximum number of records to be returned in a single list
*/
public async listDeliveryPositionClose(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: { contract?: string; limit?: number },
): Promise<{ response: AxiosResponse; body: Array<PositionClose> }> {
const localVarPath =
Expand Down Expand Up @@ -1219,7 +1219,7 @@ export class DeliveryApi {
* @param opts.at Specify a liquidation timestamp
*/
public async listDeliveryLiquidates(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: { contract?: string; limit?: number; at?: number },
): Promise<{ response: AxiosResponse; body: Array<FuturesLiquidate> }> {
const localVarPath =
Expand Down Expand Up @@ -1274,7 +1274,7 @@ export class DeliveryApi {
* @param opts.at Specify a settlement timestamp
*/
public async listDeliverySettlements(
settle: 'btc' | 'usdt' | 'usd',
settle: 'usdt' | 'btc',
opts: { contract?: string; limit?: number; at?: number },
): Promise<{ response: AxiosResponse; body: Array<DeliverySettlement> }> {
const localVarPath =
Expand Down Expand Up @@ -1496,7 +1496,7 @@ export class DeliveryApi {

/**
*
* @summary Get a single order
* @summary Get a price-triggered order
* @param settle Settle currency
* @param orderId Retrieve the data of the order with the specified ID
*/
Expand Down
Loading

0 comments on commit eed01d4

Please sign in to comment.