USDC request param typings
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
export * from './account-asset';
|
||||
export * from './usdt-perp';
|
||||
export * from './usdc-perp';
|
||||
export * from './usdc-options';
|
||||
export * from './usdc-shared';
|
||||
|
||||
135
src/types/request/usdc-options.ts
Normal file
135
src/types/request/usdc-options.ts
Normal file
@@ -0,0 +1,135 @@
|
||||
import { OrderSide } from '../shared';
|
||||
import { USDCOrderFilter } from './usdc-perp';
|
||||
import { USDCAPICategory, USDCOrderType, USDCTimeInForce } from './usdc-shared';
|
||||
|
||||
export interface USDCOptionsContractInfoRequest {
|
||||
symbol?: string;
|
||||
status?: 'WAITING_ONLINE' | 'ONLINE' | 'DELIVERING' | 'OFFLINE';
|
||||
baseCoin?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsDeliveryPriceRequest {
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsRecentTradesRequest {
|
||||
category: USDCAPICategory;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
optionType?: 'Call' | 'Put';
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsHistoricalVolatilityRequest {
|
||||
baseCoin?: string;
|
||||
period?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsOrderRequest {
|
||||
symbol: string;
|
||||
orderType: USDCOrderType;
|
||||
side: OrderSide;
|
||||
orderPrice?: string;
|
||||
orderQty: string;
|
||||
iv?: string;
|
||||
timeInForce?: USDCTimeInForce;
|
||||
orderLinkId?: string;
|
||||
reduceOnly?: boolean;
|
||||
}
|
||||
|
||||
export interface USDCOptionsModifyOrderRequest {
|
||||
symbol: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderPrice?: string;
|
||||
orderQty?: string;
|
||||
iv?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsCancelOrderRequest {
|
||||
symbol: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsCancelAllOrdersRequest {
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsActiveOrdersRealtimeRequest {
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
direction?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsActiveOrdersRequest {
|
||||
category: 'OPTION';
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
direction?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsHistoricOrdersRequest {
|
||||
category: 'OPTION';
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderStatus?: string;
|
||||
direction?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsOrderExecutionRequest {
|
||||
category: 'OPTION';
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
startTime?: string;
|
||||
direction?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsDeliveryHistoryRequest {
|
||||
symbol: string;
|
||||
expDate?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsPositionsInfoExpiryRequest {
|
||||
expDate?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCOptionsModifyMMPRequest {
|
||||
currency: string;
|
||||
windowMs: number;
|
||||
frozenPeriodMs: number;
|
||||
qtyLimit: string;
|
||||
deltaLimit: string;
|
||||
}
|
||||
@@ -1,9 +1,5 @@
|
||||
export interface USDCKlineRequest {
|
||||
symbol: string;
|
||||
period: string;
|
||||
startTime: number;
|
||||
limit?: string;
|
||||
}
|
||||
import { OrderSide } from '../shared';
|
||||
import { USDCAPICategory, USDCOrderType, USDCTimeInForce } from './usdc-shared';
|
||||
|
||||
export interface USDCOpenInterestRequest {
|
||||
symbol: string;
|
||||
@@ -12,8 +8,90 @@ export interface USDCOpenInterestRequest {
|
||||
}
|
||||
|
||||
export interface USDCLast500TradesRequest {
|
||||
category: string;
|
||||
category: USDCAPICategory;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface USDCSymbolDirectionLimit {
|
||||
symbol?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface USDCSymbolDirectionLimitCursor {
|
||||
symbol?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export type USDCOrderFilter = 'Order' | 'StopOrder';
|
||||
|
||||
export interface USDCPerpOrderRequest {
|
||||
symbol: string;
|
||||
orderType: USDCOrderType;
|
||||
orderFilter: USDCOrderFilter;
|
||||
side: OrderSide;
|
||||
orderPrice?: string;
|
||||
orderQty: string;
|
||||
timeInForce?: USDCTimeInForce;
|
||||
orderLinkId?: string;
|
||||
reduceOnly?: boolean;
|
||||
closeOnTrigger?: boolean;
|
||||
takeProfit?: string;
|
||||
stopLoss?: string;
|
||||
tptriggerby?: string;
|
||||
slTriggerBy?: string;
|
||||
basePrice?: string;
|
||||
triggerPrice?: string;
|
||||
triggerBy?: string;
|
||||
mmp?: boolean;
|
||||
}
|
||||
|
||||
export interface USDCPerpModifyOrderRequest {
|
||||
symbol: string;
|
||||
orderFilter: USDCOrderFilter;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderPrice?: string;
|
||||
orderQty?: string;
|
||||
takeProfit?: string;
|
||||
stopLoss?: string;
|
||||
tptriggerby?: string;
|
||||
slTriggerBy?: string;
|
||||
triggerPrice?: string;
|
||||
}
|
||||
|
||||
export interface USDCPerpCancelOrderRequest {
|
||||
symbol: string;
|
||||
orderFilter: USDCOrderFilter;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
}
|
||||
|
||||
export interface USDCPerpActiveOrdersRequest {
|
||||
category: 'PERPETUAL';
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderFilter?: USDCOrderFilter;
|
||||
direction?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
export interface USDCPerpHistoricOrdersRequest {
|
||||
category: 'PERPETUAL';
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
orderStatus?: string;
|
||||
orderFilter?: USDCOrderFilter;
|
||||
direction?: string;
|
||||
limit?: number;
|
||||
cursor?: string;
|
||||
}
|
||||
|
||||
36
src/types/request/usdc-shared.ts
Normal file
36
src/types/request/usdc-shared.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
export type USDCAPICategory = 'PERPETUAL' | 'OPTION';
|
||||
|
||||
export type USDCOrderType = 'Limit' | 'Market';
|
||||
export type USDCTimeInForce =
|
||||
| 'GoodTillCancel'
|
||||
| 'ImmediateOrCancel'
|
||||
| 'FillOrKill'
|
||||
| 'PostOnly';
|
||||
|
||||
export interface USDCKlineRequest {
|
||||
symbol: string;
|
||||
period: string;
|
||||
startTime: number;
|
||||
limit?: string;
|
||||
}
|
||||
|
||||
export interface USDCTransactionLogRequest {
|
||||
type: string;
|
||||
baseCoin?: string;
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
category?: USDCAPICategory;
|
||||
}
|
||||
|
||||
export interface USDCPositionsRequest {
|
||||
category: USDCAPICategory;
|
||||
symbol?: string;
|
||||
baseCoin?: string;
|
||||
expDate?: string;
|
||||
direction?: string;
|
||||
limit?: string;
|
||||
cursor?: string;
|
||||
}
|
||||
Reference in New Issue
Block a user