bybit-api 4.2.3 → 4.2.4
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/lib/rest-client-v5.d.ts +105 -1
- package/lib/rest-client-v5.js +119 -0
- package/lib/rest-client-v5.js.map +1 -1
- package/lib/types/request/index.d.ts +2 -0
- package/lib/types/request/index.js +2 -0
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/request/v5-rfq.d.ts +85 -0
- package/lib/types/request/v5-rfq.js +3 -0
- package/lib/types/request/v5-rfq.js.map +1 -0
- package/lib/types/response/index.d.ts +2 -0
- package/lib/types/response/index.js +2 -0
- package/lib/types/response/index.js.map +1 -1
- package/lib/types/response/v5-rfq.d.ts +156 -0
- package/lib/types/response/v5-rfq.js +3 -0
- package/lib/types/response/v5-rfq.js.map +1 -0
- package/lib/types/websockets/ws-events.d.ts +28 -0
- package/lib/types/websockets/ws-events.js.map +1 -1
- package/llms.txt +3248 -2498
- package/package.json +1 -1
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
export interface RFQConfigV5 {
|
|
2
|
+
deskCode: string;
|
|
3
|
+
maxLegs: number;
|
|
4
|
+
maxLP: number;
|
|
5
|
+
maxActiveRfq: number;
|
|
6
|
+
minLimitQtySpotOrder: number;
|
|
7
|
+
minLimitQtyContractOrder: number;
|
|
8
|
+
minLimitQtyOptionOrder: number;
|
|
9
|
+
strategyTypes: {
|
|
10
|
+
strategyName: string;
|
|
11
|
+
}[];
|
|
12
|
+
counterparties: {
|
|
13
|
+
strategyName: string;
|
|
14
|
+
}[];
|
|
15
|
+
}
|
|
16
|
+
export interface RFQCounterpartyV5 {
|
|
17
|
+
traderName: string;
|
|
18
|
+
deskCode: string;
|
|
19
|
+
type: string | null;
|
|
20
|
+
}
|
|
21
|
+
export interface CreateRFQResultV5 {
|
|
22
|
+
rfqId: string;
|
|
23
|
+
rfqLinkId: string;
|
|
24
|
+
status: 'Active' | 'Canceled' | 'Filled' | 'Expired' | 'Failed';
|
|
25
|
+
expiresAt: string;
|
|
26
|
+
deskCode: string;
|
|
27
|
+
}
|
|
28
|
+
export interface CancelRFQResultV5 {
|
|
29
|
+
rfqId: string;
|
|
30
|
+
rfqLinkId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface CancelRFQItemV5 {
|
|
33
|
+
rfqId: string;
|
|
34
|
+
rfqLinkId: string;
|
|
35
|
+
code: number;
|
|
36
|
+
msg: string;
|
|
37
|
+
}
|
|
38
|
+
export interface CancelAllRFQResultV5 {
|
|
39
|
+
data: CancelRFQItemV5[];
|
|
40
|
+
}
|
|
41
|
+
export interface CreateRFQQuoteResultV5 {
|
|
42
|
+
rfqId: string;
|
|
43
|
+
quoteId: string;
|
|
44
|
+
quoteLinkId: string;
|
|
45
|
+
expiresAt: string;
|
|
46
|
+
deskCode: string;
|
|
47
|
+
status: 'Active' | 'Canceled' | 'Filled' | 'Expired' | 'Failed';
|
|
48
|
+
}
|
|
49
|
+
export interface ExecuteRFQQuoteResultV5 {
|
|
50
|
+
rfqId: string;
|
|
51
|
+
rfqLinkId: string;
|
|
52
|
+
quoteId: string;
|
|
53
|
+
status: 'Processing' | 'Rejected';
|
|
54
|
+
rejectParty: string;
|
|
55
|
+
}
|
|
56
|
+
export interface CancelRFQQuoteResultV5 {
|
|
57
|
+
rfqId: string;
|
|
58
|
+
quoteId: string;
|
|
59
|
+
quoteLinkId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface CancelRFQQuoteItemV5 {
|
|
62
|
+
rfqId: string;
|
|
63
|
+
quoteId: string;
|
|
64
|
+
quoteLinkId: string;
|
|
65
|
+
code: number;
|
|
66
|
+
msg: string;
|
|
67
|
+
}
|
|
68
|
+
export interface RFQLegV5 {
|
|
69
|
+
category: 'linear' | 'option' | 'spot';
|
|
70
|
+
symbol: string;
|
|
71
|
+
side: 'buy' | 'sell';
|
|
72
|
+
qty: string;
|
|
73
|
+
isLeverage?: boolean;
|
|
74
|
+
}
|
|
75
|
+
export interface RFQItemV5 {
|
|
76
|
+
rfqId: string;
|
|
77
|
+
rfqLinkId: string;
|
|
78
|
+
counterparties: string[];
|
|
79
|
+
expiresAt: string;
|
|
80
|
+
strategyType: string;
|
|
81
|
+
status: 'Active' | 'Canceled' | 'PendingFill' | 'Filled' | 'Expired' | 'Failed';
|
|
82
|
+
deskCode: string;
|
|
83
|
+
createdAt: number;
|
|
84
|
+
updatedAt: number;
|
|
85
|
+
legs: RFQLegV5[];
|
|
86
|
+
}
|
|
87
|
+
export interface GetRFQRealtimeResultV5 {
|
|
88
|
+
list: RFQItemV5[];
|
|
89
|
+
}
|
|
90
|
+
export interface RFQHistory {
|
|
91
|
+
cursor: string;
|
|
92
|
+
list: RFQItemV5[];
|
|
93
|
+
}
|
|
94
|
+
export interface QuoteLegV5 {
|
|
95
|
+
category: 'spot' | 'linear' | 'option';
|
|
96
|
+
symbol: string;
|
|
97
|
+
price: string;
|
|
98
|
+
qty?: string;
|
|
99
|
+
isLeverage?: boolean;
|
|
100
|
+
}
|
|
101
|
+
export interface RFQQuoteItemV5 {
|
|
102
|
+
rfqId: string;
|
|
103
|
+
rfqLinkId: string;
|
|
104
|
+
quoteId: string;
|
|
105
|
+
quoteLinkId: string;
|
|
106
|
+
expiresAt: string;
|
|
107
|
+
deskCode: string;
|
|
108
|
+
status: 'Active' | 'Canceled' | 'PendingFill' | 'Filled' | 'Expired' | 'Failed';
|
|
109
|
+
execQuoteSide: string;
|
|
110
|
+
createdAt: number;
|
|
111
|
+
updatedAt: number;
|
|
112
|
+
quoteBuyList: QuoteLegV5[];
|
|
113
|
+
quoteSellList: QuoteLegV5[];
|
|
114
|
+
}
|
|
115
|
+
export interface RFQTradeLegV5 {
|
|
116
|
+
category: 'linear' | 'option' | 'spot';
|
|
117
|
+
orderId: string;
|
|
118
|
+
symbol: string;
|
|
119
|
+
side: 'buy' | 'sell';
|
|
120
|
+
price: string;
|
|
121
|
+
qty: string;
|
|
122
|
+
isLeverage?: boolean;
|
|
123
|
+
markPrice: string;
|
|
124
|
+
execFee: string;
|
|
125
|
+
execId: string;
|
|
126
|
+
resultCode: number;
|
|
127
|
+
resultMessage: string;
|
|
128
|
+
rejectParty: string;
|
|
129
|
+
}
|
|
130
|
+
export interface RFQTradeV5 {
|
|
131
|
+
rfqId: string;
|
|
132
|
+
quoteId: string;
|
|
133
|
+
quoteSide: 'buy' | 'sell';
|
|
134
|
+
strategyType: string;
|
|
135
|
+
status: 'Filled' | 'Rejected';
|
|
136
|
+
rfqDeskCode: string;
|
|
137
|
+
quoteDestCode: string;
|
|
138
|
+
createdAt: number;
|
|
139
|
+
updatedAt: number;
|
|
140
|
+
legs: RFQTradeLegV5[];
|
|
141
|
+
}
|
|
142
|
+
export interface RFQPublicTradeLegV5 {
|
|
143
|
+
category: 'linear' | 'option' | 'spot';
|
|
144
|
+
symbol: string;
|
|
145
|
+
side: 'buy' | 'sell';
|
|
146
|
+
price: string;
|
|
147
|
+
qty: string;
|
|
148
|
+
markPrice: string;
|
|
149
|
+
}
|
|
150
|
+
export interface RFQPublicTradeV5 {
|
|
151
|
+
rfqId: string;
|
|
152
|
+
strategyType: string;
|
|
153
|
+
createdAt: number;
|
|
154
|
+
updatedAt: number;
|
|
155
|
+
legs: RFQPublicTradeLegV5[];
|
|
156
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v5-rfq.js","sourceRoot":"","sources":["../../../src/types/response/v5-rfq.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import WebSocket from 'isomorphic-ws';
|
|
2
|
+
import { RFQItemV5, RFQPublicTradeV5, RFQQuoteItemV5, RFQTradeV5 } from '../response/v5-rfq';
|
|
2
3
|
import { CategoryV5, ExecTypeV5, OCOTriggerTypeV5, OrderCancelTypeV5, OrderCreateTypeV5, OrderRejectReasonV5, OrderSideV5, OrderSMPTypeV5, OrderStatusV5, OrderTimeInForceV5, OrderTriggerByV5, OrderTypeV5, PositionIdx, PositionSideV5, PositionStatusV5, StopOrderTypeV5, SystemStatusItemV5, TPSLModeV5, TradeModeV5 } from '../shared-v5';
|
|
3
4
|
import { WsKey } from './ws-general';
|
|
4
5
|
export interface MessageEventLike {
|
|
@@ -416,3 +417,30 @@ export interface WSPriceLimitV5 {
|
|
|
416
417
|
}
|
|
417
418
|
export type WSPriceLimitEventV5 = WSPublicTopicEventV5<string, 'snapshot', WSPriceLimitV5>;
|
|
418
419
|
export type WSSystemStatusEventV5 = WSPublicTopicEventV5<'system.status', 'snapshot', SystemStatusItemV5[]>;
|
|
420
|
+
/**
|
|
421
|
+
* RFQ WebSocket Events
|
|
422
|
+
*/
|
|
423
|
+
/**
|
|
424
|
+
* RFQ Inquiry Channel
|
|
425
|
+
* Private push for RFQ inquiries sent or received by the user
|
|
426
|
+
* Topics: rfq.open.rfqs, rfq.site.rfqs
|
|
427
|
+
*/
|
|
428
|
+
export type WSRFQInquiryEventV5 = WSPrivateTopicEventV5<'rfq.open.rfqs' | 'rfq.site.rfqs', RFQItemV5[]>;
|
|
429
|
+
/**
|
|
430
|
+
* RFQ Quote Channel
|
|
431
|
+
* Private push for quotes sent or received by the user
|
|
432
|
+
* Topics: rfq.open.quotes, rfq.site.quotes
|
|
433
|
+
*/
|
|
434
|
+
export type WSRFQQuoteEventV5 = WSPrivateTopicEventV5<'rfq.open.quotes' | 'rfq.site.quotes', RFQQuoteItemV5[]>;
|
|
435
|
+
/**
|
|
436
|
+
* RFQ Trade Channel
|
|
437
|
+
* Private push for block trades executed by the user
|
|
438
|
+
* Topics: rfq.open.trades, rfq.site.trades
|
|
439
|
+
*/
|
|
440
|
+
export type WSRFQTradeEventV5 = WSPrivateTopicEventV5<'rfq.open.trades' | 'rfq.site.trades', RFQTradeV5[]>;
|
|
441
|
+
/**
|
|
442
|
+
* RFQ Public Trade Channel
|
|
443
|
+
* Public push for all block trades
|
|
444
|
+
* Topics: rfq.open.public.trades, rfq.site.public.trades
|
|
445
|
+
*/
|
|
446
|
+
export type WSRFQPublicTradeEventV5 = WSPublicTopicEventV5<'rfq.open.public.trades' | 'rfq.site.public.trades', 'snapshot', RFQPublicTradeV5[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-events.js","sourceRoot":"","sources":["../../../src/types/websockets/ws-events.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ws-events.js","sourceRoot":"","sources":["../../../src/types/websockets/ws-events.ts"],"names":[],"mappings":";;AAqCA,wCAOC;AAPD,SAAgB,cAAc,CAAC,GAAY;IACzC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,OAAO,GAAG,GAAuB,CAAC;IACxC,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,SAAS,IAAI,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC;AAC9E,CAAC"}
|