bybit-api
Version:
Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.
157 lines (156 loc) • 3.74 kB
TypeScript
export interface RFQConfigV5 {
deskCode: string;
maxLegs: number;
maxLP: number;
maxActiveRfq: number;
minLimitQtySpotOrder: number;
minLimitQtyContractOrder: number;
minLimitQtyOptionOrder: number;
strategyTypes: {
strategyName: string;
}[];
counterparties: {
strategyName: string;
}[];
}
export interface RFQCounterpartyV5 {
traderName: string;
deskCode: string;
type: string | null;
}
export interface CreateRFQResultV5 {
rfqId: string;
rfqLinkId: string;
status: 'Active' | 'Canceled' | 'Filled' | 'Expired' | 'Failed';
expiresAt: string;
deskCode: string;
}
export interface CancelRFQResultV5 {
rfqId: string;
rfqLinkId: string;
}
export interface CancelRFQItemV5 {
rfqId: string;
rfqLinkId: string;
code: number;
msg: string;
}
export interface CancelAllRFQResultV5 {
data: CancelRFQItemV5[];
}
export interface CreateRFQQuoteResultV5 {
rfqId: string;
quoteId: string;
quoteLinkId: string;
expiresAt: string;
deskCode: string;
status: 'Active' | 'Canceled' | 'Filled' | 'Expired' | 'Failed';
}
export interface ExecuteRFQQuoteResultV5 {
rfqId: string;
rfqLinkId: string;
quoteId: string;
status: 'Processing' | 'Rejected';
rejectParty: string;
}
export interface CancelRFQQuoteResultV5 {
rfqId: string;
quoteId: string;
quoteLinkId: string;
}
export interface CancelRFQQuoteItemV5 {
rfqId: string;
quoteId: string;
quoteLinkId: string;
code: number;
msg: string;
}
export interface RFQLegV5 {
category: 'linear' | 'option' | 'spot';
symbol: string;
side: 'buy' | 'sell';
qty: string;
isLeverage?: boolean;
}
export interface RFQItemV5 {
rfqId: string;
rfqLinkId: string;
counterparties: string[];
expiresAt: string;
strategyType: string;
status: 'Active' | 'Canceled' | 'PendingFill' | 'Filled' | 'Expired' | 'Failed';
deskCode: string;
createdAt: number;
updatedAt: number;
legs: RFQLegV5[];
}
export interface GetRFQRealtimeResultV5 {
list: RFQItemV5[];
}
export interface RFQHistory {
cursor: string;
list: RFQItemV5[];
}
export interface QuoteLegV5 {
category: 'spot' | 'linear' | 'option';
symbol: string;
price: string;
qty?: string;
isLeverage?: boolean;
}
export interface RFQQuoteItemV5 {
rfqId: string;
rfqLinkId: string;
quoteId: string;
quoteLinkId: string;
expiresAt: string;
deskCode: string;
status: 'Active' | 'Canceled' | 'PendingFill' | 'Filled' | 'Expired' | 'Failed';
execQuoteSide: string;
createdAt: number;
updatedAt: number;
quoteBuyList: QuoteLegV5[];
quoteSellList: QuoteLegV5[];
}
export interface RFQTradeLegV5 {
category: 'linear' | 'option' | 'spot';
orderId: string;
symbol: string;
side: 'buy' | 'sell';
price: string;
qty: string;
isLeverage?: boolean;
markPrice: string;
execFee: string;
execId: string;
resultCode: number;
resultMessage: string;
rejectParty: string;
}
export interface RFQTradeV5 {
rfqId: string;
quoteId: string;
quoteSide: 'buy' | 'sell';
strategyType: string;
status: 'Filled' | 'Rejected';
rfqDeskCode: string;
quoteDestCode: string;
createdAt: number;
updatedAt: number;
legs: RFQTradeLegV5[];
}
export interface RFQPublicTradeLegV5 {
category: 'linear' | 'option' | 'spot';
symbol: string;
side: 'buy' | 'sell';
price: string;
qty: string;
markPrice: string;
}
export interface RFQPublicTradeV5 {
rfqId: string;
strategyType: string;
createdAt: number;
updatedAt: number;
legs: RFQPublicTradeLegV5[];
}