ccxt 4.2.30 → 4.2.34

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.
Files changed (318) hide show
  1. package/.gitattributes +1 -0
  2. package/CONTRIBUTING.md +20 -1
  3. package/README.md +9 -9
  4. package/build.sh +9 -2
  5. package/cleanup.sh +3 -0
  6. package/dist/ccxt.browser.js +1136 -561
  7. package/dist/ccxt.browser.min.js +3 -3
  8. package/dist/cjs/ccxt.js +1 -1
  9. package/dist/cjs/src/ace.js +3 -2
  10. package/dist/cjs/src/ascendex.js +1 -1
  11. package/dist/cjs/src/base/Exchange.js +66 -24
  12. package/dist/cjs/src/bigone.js +21 -1
  13. package/dist/cjs/src/binance.js +6 -5
  14. package/dist/cjs/src/bingx.js +4 -3
  15. package/dist/cjs/src/bit2c.js +12 -0
  16. package/dist/cjs/src/bitfinex2.js +415 -41
  17. package/dist/cjs/src/bitforex.js +3 -0
  18. package/dist/cjs/src/bitget.js +3 -3
  19. package/dist/cjs/src/bitmart.js +1 -1
  20. package/dist/cjs/src/bitrue.js +3 -3
  21. package/dist/cjs/src/blockchaincom.js +1 -1
  22. package/dist/cjs/src/bybit.js +1 -1
  23. package/dist/cjs/src/coinbase.js +12 -2
  24. package/dist/cjs/src/coinex.js +1 -1
  25. package/dist/cjs/src/cryptocom.js +10 -10
  26. package/dist/cjs/src/deribit.js +1 -0
  27. package/dist/cjs/src/gate.js +34 -29
  28. package/dist/cjs/src/htx.js +1 -1
  29. package/dist/cjs/src/kraken.js +42 -1
  30. package/dist/cjs/src/krakenfutures.js +3 -0
  31. package/dist/cjs/src/kucoin.js +1 -1
  32. package/dist/cjs/src/lbank.js +27 -26
  33. package/dist/cjs/src/mexc.js +2 -1
  34. package/dist/cjs/src/okx.js +20 -5
  35. package/dist/cjs/src/phemex.js +8 -8
  36. package/dist/cjs/src/poloniexfutures.js +3 -0
  37. package/dist/cjs/src/pro/alpaca.js +8 -4
  38. package/dist/cjs/src/pro/ascendex.js +1 -2
  39. package/dist/cjs/src/pro/binance.js +14 -10
  40. package/dist/cjs/src/pro/bingx.js +1 -1
  41. package/dist/cjs/src/pro/bitfinex.js +21 -24
  42. package/dist/cjs/src/pro/bitfinex2.js +13 -17
  43. package/dist/cjs/src/pro/bitget.js +3 -1
  44. package/dist/cjs/src/pro/bitmart.js +3 -8
  45. package/dist/cjs/src/pro/bitmex.js +4 -7
  46. package/dist/cjs/src/pro/bitopro.js +2 -5
  47. package/dist/cjs/src/pro/bitrue.js +1 -1
  48. package/dist/cjs/src/pro/bitstamp.js +2 -3
  49. package/dist/cjs/src/pro/bitvavo.js +12 -5
  50. package/dist/cjs/src/pro/blockchaincom.js +22 -23
  51. package/dist/cjs/src/pro/bybit.js +5 -5
  52. package/dist/cjs/src/pro/cex.js +7 -7
  53. package/dist/cjs/src/pro/coinbase.js +3 -2
  54. package/dist/cjs/src/pro/coinbasepro.js +1 -1
  55. package/dist/cjs/src/pro/coinex.js +15 -13
  56. package/dist/cjs/src/pro/currencycom.js +5 -7
  57. package/dist/cjs/src/pro/deribit.js +4 -4
  58. package/dist/cjs/src/pro/exmo.js +15 -13
  59. package/dist/cjs/src/pro/gate.js +1 -1
  60. package/dist/cjs/src/pro/gemini.js +4 -2
  61. package/dist/cjs/src/pro/hitbtc.js +9 -8
  62. package/dist/cjs/src/pro/hollaex.js +2 -2
  63. package/dist/cjs/src/pro/htx.js +6 -7
  64. package/dist/cjs/src/pro/huobijp.js +3 -5
  65. package/dist/cjs/src/pro/idex.js +1 -1
  66. package/dist/cjs/src/pro/independentreserve.js +14 -13
  67. package/dist/cjs/src/pro/kraken.js +10 -16
  68. package/dist/cjs/src/pro/krakenfutures.js +10 -6
  69. package/dist/cjs/src/pro/kucoin.js +10 -11
  70. package/dist/cjs/src/pro/kucoinfutures.js +12 -11
  71. package/dist/cjs/src/pro/lbank.js +10 -10
  72. package/dist/cjs/src/pro/luno.js +12 -14
  73. package/dist/cjs/src/pro/mexc.js +3 -2
  74. package/dist/cjs/src/pro/ndax.js +7 -13
  75. package/dist/cjs/src/pro/okcoin.js +7 -12
  76. package/dist/cjs/src/pro/okx.js +6 -11
  77. package/dist/cjs/src/pro/onetrading.js +16 -15
  78. package/dist/cjs/src/pro/p2b.js +5 -3
  79. package/dist/cjs/src/pro/phemex.js +16 -11
  80. package/dist/cjs/src/pro/poloniex.js +6 -4
  81. package/dist/cjs/src/pro/poloniexfutures.js +14 -9
  82. package/dist/cjs/src/pro/probit.js +15 -11
  83. package/dist/cjs/src/pro/upbit.js +8 -8
  84. package/dist/cjs/src/pro/wazirx.js +6 -3
  85. package/dist/cjs/src/pro/woo.js +8 -6
  86. package/dist/cjs/src/probit.js +3 -3
  87. package/dist/cjs/src/timex.js +1 -1
  88. package/dist/cjs/src/tokocrypto.js +2 -2
  89. package/dist/cjs/src/wavesexchange.js +2 -1
  90. package/dist/cjs/src/whitebit.js +1 -1
  91. package/dist/cjs/src/woo.js +1 -1
  92. package/dist/cjs/src/yobit.js +39 -0
  93. package/js/ccxt.d.ts +1 -1
  94. package/js/ccxt.js +1 -1
  95. package/js/src/abstract/coinbase.d.ts +10 -0
  96. package/js/src/abstract/okx.d.ts +12 -1
  97. package/js/src/ace.d.ts +1 -1
  98. package/js/src/ace.js +3 -2
  99. package/js/src/alpaca.d.ts +1 -1
  100. package/js/src/ascendex.d.ts +5 -15
  101. package/js/src/ascendex.js +1 -1
  102. package/js/src/base/Exchange.d.ts +88 -79
  103. package/js/src/base/Exchange.js +66 -24
  104. package/js/src/base/types.d.ts +90 -6
  105. package/js/src/bigone.d.ts +5 -15
  106. package/js/src/bigone.js +21 -1
  107. package/js/src/binance.d.ts +13 -23
  108. package/js/src/binance.js +6 -5
  109. package/js/src/bingx.d.ts +6 -16
  110. package/js/src/bingx.js +4 -3
  111. package/js/src/bit2c.d.ts +1 -1
  112. package/js/src/bit2c.js +12 -0
  113. package/js/src/bitbank.d.ts +2 -2
  114. package/js/src/bitbns.d.ts +1 -1
  115. package/js/src/bitfinex.d.ts +5 -5
  116. package/js/src/bitfinex2.d.ts +11 -16
  117. package/js/src/bitfinex2.js +415 -41
  118. package/js/src/bitflyer.d.ts +5 -5
  119. package/js/src/bitforex.d.ts +1 -1
  120. package/js/src/bitforex.js +3 -0
  121. package/js/src/bitget.d.ts +8 -38
  122. package/js/src/bitget.js +3 -3
  123. package/js/src/bithumb.d.ts +2 -2
  124. package/js/src/bitmart.d.ts +10 -21
  125. package/js/src/bitmart.js +1 -1
  126. package/js/src/bitmex.d.ts +3 -3
  127. package/js/src/bitopro.d.ts +2 -2
  128. package/js/src/bitrue.d.ts +5 -15
  129. package/js/src/bitrue.js +3 -3
  130. package/js/src/bitso.d.ts +4 -4
  131. package/js/src/bitstamp.d.ts +2 -2
  132. package/js/src/bitteam.d.ts +1 -1
  133. package/js/src/bitvavo.d.ts +3 -3
  134. package/js/src/bl3p.d.ts +1 -1
  135. package/js/src/blockchaincom.d.ts +2 -2
  136. package/js/src/blockchaincom.js +1 -1
  137. package/js/src/btcalpha.d.ts +1 -1
  138. package/js/src/btcbox.d.ts +1 -1
  139. package/js/src/btcmarkets.d.ts +3 -3
  140. package/js/src/btcturk.d.ts +1 -1
  141. package/js/src/bybit.d.ts +8 -8
  142. package/js/src/bybit.js +1 -1
  143. package/js/src/cex.d.ts +1 -1
  144. package/js/src/coinbase.d.ts +6 -50
  145. package/js/src/coinbase.js +12 -2
  146. package/js/src/coinbasepro.d.ts +2 -2
  147. package/js/src/coincheck.d.ts +1 -1
  148. package/js/src/coinex.d.ts +8 -8
  149. package/js/src/coinex.js +1 -1
  150. package/js/src/coinlist.d.ts +4 -14
  151. package/js/src/coinmate.d.ts +2 -2
  152. package/js/src/coinmetro.d.ts +2 -2
  153. package/js/src/coinone.d.ts +1 -1
  154. package/js/src/coinsph.d.ts +2 -2
  155. package/js/src/coinspot.d.ts +1 -1
  156. package/js/src/cryptocom.d.ts +4 -4
  157. package/js/src/cryptocom.js +10 -10
  158. package/js/src/currencycom.d.ts +2 -2
  159. package/js/src/delta.d.ts +2 -2
  160. package/js/src/deribit.d.ts +4 -14
  161. package/js/src/deribit.js +1 -0
  162. package/js/src/digifinex.d.ts +10 -38
  163. package/js/src/exmo.d.ts +2 -2
  164. package/js/src/gate.d.ts +8 -18
  165. package/js/src/gate.js +34 -29
  166. package/js/src/gemini.d.ts +2 -2
  167. package/js/src/hitbtc.d.ts +6 -16
  168. package/js/src/hollaex.d.ts +2 -2
  169. package/js/src/htx.d.ts +11 -21
  170. package/js/src/htx.js +1 -1
  171. package/js/src/huobijp.d.ts +4 -4
  172. package/js/src/idex.d.ts +3 -3
  173. package/js/src/independentreserve.d.ts +2 -2
  174. package/js/src/indodax.d.ts +2 -2
  175. package/js/src/kraken.d.ts +5 -5
  176. package/js/src/kraken.js +42 -1
  177. package/js/src/krakenfutures.d.ts +7 -7
  178. package/js/src/krakenfutures.js +3 -0
  179. package/js/src/kucoin.d.ts +8 -29
  180. package/js/src/kucoin.js +1 -1
  181. package/js/src/kucoinfutures.d.ts +4 -4
  182. package/js/src/kuna.d.ts +2 -2
  183. package/js/src/latoken.d.ts +4 -14
  184. package/js/src/lbank.d.ts +3 -6
  185. package/js/src/lbank.js +27 -26
  186. package/js/src/luno.d.ts +1 -1
  187. package/js/src/lykke.d.ts +2 -2
  188. package/js/src/mercado.d.ts +2 -2
  189. package/js/src/mexc.d.ts +6 -6
  190. package/js/src/mexc.js +2 -1
  191. package/js/src/ndax.d.ts +2 -2
  192. package/js/src/novadax.d.ts +4 -15
  193. package/js/src/oceanex.d.ts +1 -1
  194. package/js/src/okcoin.d.ts +5 -15
  195. package/js/src/okx.d.ts +8 -18
  196. package/js/src/okx.js +20 -5
  197. package/js/src/onetrading.d.ts +2 -2
  198. package/js/src/p2b.d.ts +1 -1
  199. package/js/src/paymium.d.ts +3 -13
  200. package/js/src/phemex.d.ts +5 -5
  201. package/js/src/phemex.js +8 -8
  202. package/js/src/poloniex.d.ts +4 -14
  203. package/js/src/poloniexfutures.d.ts +1 -1
  204. package/js/src/poloniexfutures.js +3 -0
  205. package/js/src/pro/alpaca.d.ts +2 -2
  206. package/js/src/pro/alpaca.js +8 -4
  207. package/js/src/pro/ascendex.d.ts +2 -2
  208. package/js/src/pro/ascendex.js +1 -2
  209. package/js/src/pro/binance.d.ts +3 -3
  210. package/js/src/pro/binance.js +14 -10
  211. package/js/src/pro/bingx.d.ts +1 -1
  212. package/js/src/pro/bingx.js +1 -1
  213. package/js/src/pro/bitfinex.d.ts +2 -2
  214. package/js/src/pro/bitfinex.js +21 -24
  215. package/js/src/pro/bitfinex2.d.ts +2 -2
  216. package/js/src/pro/bitfinex2.js +13 -17
  217. package/js/src/pro/bitget.js +3 -1
  218. package/js/src/pro/bitmart.d.ts +3 -3
  219. package/js/src/pro/bitmart.js +3 -8
  220. package/js/src/pro/bitmex.d.ts +1 -1
  221. package/js/src/pro/bitmex.js +4 -7
  222. package/js/src/pro/bitopro.d.ts +1 -1
  223. package/js/src/pro/bitopro.js +2 -5
  224. package/js/src/pro/bitrue.js +1 -1
  225. package/js/src/pro/bitstamp.d.ts +1 -1
  226. package/js/src/pro/bitstamp.js +2 -3
  227. package/js/src/pro/bitvavo.d.ts +3 -3
  228. package/js/src/pro/bitvavo.js +12 -5
  229. package/js/src/pro/blockchaincom.d.ts +8 -8
  230. package/js/src/pro/blockchaincom.js +22 -23
  231. package/js/src/pro/bybit.d.ts +2 -2
  232. package/js/src/pro/bybit.js +5 -5
  233. package/js/src/pro/cex.d.ts +1 -1
  234. package/js/src/pro/cex.js +7 -7
  235. package/js/src/pro/coinbase.d.ts +1 -1
  236. package/js/src/pro/coinbase.js +3 -2
  237. package/js/src/pro/coinbasepro.d.ts +1 -1
  238. package/js/src/pro/coinbasepro.js +1 -1
  239. package/js/src/pro/coinex.d.ts +2 -2
  240. package/js/src/pro/coinex.js +15 -13
  241. package/js/src/pro/currencycom.d.ts +1 -1
  242. package/js/src/pro/currencycom.js +5 -7
  243. package/js/src/pro/deribit.d.ts +2 -2
  244. package/js/src/pro/deribit.js +4 -4
  245. package/js/src/pro/exmo.d.ts +2 -2
  246. package/js/src/pro/exmo.js +15 -13
  247. package/js/src/pro/gate.js +1 -1
  248. package/js/src/pro/gemini.d.ts +1 -1
  249. package/js/src/pro/gemini.js +4 -2
  250. package/js/src/pro/hitbtc.d.ts +2 -2
  251. package/js/src/pro/hitbtc.js +9 -8
  252. package/js/src/pro/hollaex.d.ts +2 -2
  253. package/js/src/pro/hollaex.js +2 -2
  254. package/js/src/pro/htx.d.ts +2 -2
  255. package/js/src/pro/htx.js +6 -7
  256. package/js/src/pro/huobijp.d.ts +1 -1
  257. package/js/src/pro/huobijp.js +3 -5
  258. package/js/src/pro/idex.js +1 -1
  259. package/js/src/pro/independentreserve.d.ts +1 -1
  260. package/js/src/pro/independentreserve.js +14 -13
  261. package/js/src/pro/kraken.d.ts +2 -2
  262. package/js/src/pro/kraken.js +10 -16
  263. package/js/src/pro/krakenfutures.d.ts +1 -1
  264. package/js/src/pro/krakenfutures.js +10 -6
  265. package/js/src/pro/kucoin.d.ts +3 -3
  266. package/js/src/pro/kucoin.js +10 -11
  267. package/js/src/pro/kucoinfutures.d.ts +3 -3
  268. package/js/src/pro/kucoinfutures.js +12 -11
  269. package/js/src/pro/lbank.d.ts +1 -1
  270. package/js/src/pro/lbank.js +10 -10
  271. package/js/src/pro/luno.d.ts +2 -2
  272. package/js/src/pro/luno.js +12 -14
  273. package/js/src/pro/mexc.d.ts +2 -2
  274. package/js/src/pro/mexc.js +3 -2
  275. package/js/src/pro/ndax.d.ts +3 -3
  276. package/js/src/pro/ndax.js +7 -13
  277. package/js/src/pro/okcoin.d.ts +1 -1
  278. package/js/src/pro/okcoin.js +7 -12
  279. package/js/src/pro/okx.d.ts +1 -1
  280. package/js/src/pro/okx.js +6 -11
  281. package/js/src/pro/onetrading.d.ts +1 -1
  282. package/js/src/pro/onetrading.js +16 -15
  283. package/js/src/pro/p2b.d.ts +1 -1
  284. package/js/src/pro/p2b.js +5 -3
  285. package/js/src/pro/phemex.d.ts +3 -3
  286. package/js/src/pro/phemex.js +16 -11
  287. package/js/src/pro/poloniex.d.ts +1 -1
  288. package/js/src/pro/poloniex.js +6 -4
  289. package/js/src/pro/poloniexfutures.d.ts +4 -4
  290. package/js/src/pro/poloniexfutures.js +13 -10
  291. package/js/src/pro/probit.d.ts +1 -1
  292. package/js/src/pro/probit.js +14 -12
  293. package/js/src/pro/upbit.js +8 -8
  294. package/js/src/pro/wazirx.d.ts +1 -1
  295. package/js/src/pro/wazirx.js +6 -3
  296. package/js/src/pro/woo.d.ts +3 -3
  297. package/js/src/pro/woo.js +8 -6
  298. package/js/src/probit.d.ts +3 -3
  299. package/js/src/probit.js +3 -3
  300. package/js/src/timex.d.ts +1 -1
  301. package/js/src/timex.js +1 -1
  302. package/js/src/tokocrypto.d.ts +3 -3
  303. package/js/src/tokocrypto.js +2 -2
  304. package/js/src/upbit.d.ts +2 -2
  305. package/js/src/wavesexchange.d.ts +3 -4
  306. package/js/src/wavesexchange.js +2 -1
  307. package/js/src/wazirx.d.ts +1 -1
  308. package/js/src/whitebit.d.ts +5 -15
  309. package/js/src/whitebit.js +1 -1
  310. package/js/src/woo.d.ts +5 -15
  311. package/js/src/woo.js +1 -1
  312. package/js/src/yobit.d.ts +21 -6
  313. package/js/src/yobit.js +39 -0
  314. package/js/src/zaif.d.ts +2 -2
  315. package/js/src/zonda.d.ts +4 -14
  316. package/package.json +22 -8
  317. package/skip-tests.json +9 -1
  318. package/tests-manager.sh +1 -2
@@ -203,34 +203,118 @@ export interface DepositAddressResponse {
203
203
  info: any;
204
204
  tag?: string;
205
205
  }
206
+ export interface FundingRate {
207
+ symbol: string;
208
+ info: any;
209
+ timestamp?: number;
210
+ fundingRate?: number;
211
+ datetime?: string;
212
+ markPrice?: number;
213
+ indexPrice?: number;
214
+ interestRate?: number;
215
+ estimatedSettlePrice?: number;
216
+ fundingTimestamp?: number;
217
+ fundingDatetime?: string;
218
+ nextFundingTimestamp?: number;
219
+ nextFundingDatetime?: string;
220
+ nextFundingRate?: number;
221
+ previousFundingTimestamp?: number;
222
+ previousFundingDatetime?: string;
223
+ previousFundingRate?: number;
224
+ }
206
225
  export interface Position {
207
226
  symbol: string;
208
- id: string;
227
+ id?: string;
228
+ info: any;
209
229
  timestamp?: number;
210
- datetime: string;
230
+ datetime?: string;
211
231
  contracts?: number;
212
232
  contractSize?: number;
213
233
  side: string;
214
234
  notional?: number;
215
235
  leverage?: number;
216
236
  unrealizedPnl?: number;
217
- realizedPnl?: number;
218
237
  collateral?: number;
219
238
  entryPrice?: number;
220
239
  markPrice?: number;
221
240
  liquidationPrice?: number;
241
+ marginMode?: string;
222
242
  hedged?: boolean;
223
- maintenanceMargin?: number;
243
+ maintenenceMargin?: number;
224
244
  maintenanceMarginPercentage?: number;
225
245
  initialMargin?: number;
226
246
  initialMarginPercentage?: number;
227
- marginMode: string;
228
247
  marginRatio?: number;
229
248
  lastUpdateTimestamp?: number;
230
249
  lastPrice?: number;
231
- percentage?: number;
232
250
  stopLossPrice?: number;
233
251
  takeProfitPrice?: number;
252
+ percentage?: number;
253
+ }
254
+ export interface BorrowInterest {
255
+ account?: string;
256
+ currency?: string;
257
+ interest?: number;
258
+ interestRate?: number;
259
+ amountBorrowed?: number;
260
+ marginMode?: string;
261
+ timestamp?: number;
262
+ datetime?: string;
263
+ info: any;
264
+ }
265
+ export interface LeverageTier {
266
+ tier?: number;
267
+ currency?: string;
268
+ minNotional?: number;
269
+ maxNotional?: number;
270
+ maintenanceMarginRate?: number;
271
+ maxLeverage?: number;
272
+ info: any;
273
+ }
274
+ export interface LedgerEntry {
275
+ id?: string;
276
+ info: any;
277
+ timestamp?: number;
278
+ datetime?: string;
279
+ direction?: string;
280
+ account?: string;
281
+ referenceId?: string;
282
+ referenceAccount?: string;
283
+ type?: string;
284
+ currency?: string;
285
+ amount?: number;
286
+ before?: number;
287
+ after?: number;
288
+ status?: string;
289
+ fee?: Fee;
290
+ }
291
+ export interface DepositWithdrawFeeNetwork {
292
+ fee?: number;
293
+ percentage?: boolean;
294
+ }
295
+ export interface DepositWithdrawFee {
296
+ info: any;
297
+ withdraw?: DepositWithdrawFeeNetwork;
298
+ deposit?: DepositWithdrawFeeNetwork;
299
+ networks?: Dictionary<DepositWithdrawFeeNetwork>;
300
+ }
301
+ export interface TransferEntry {
302
+ info?: any;
303
+ id?: string;
304
+ timestamp?: number;
305
+ datetime?: string;
306
+ currency?: string;
307
+ amount?: number;
308
+ fromAccount?: string;
309
+ toAccount?: string;
310
+ status?: string;
311
+ }
312
+ export interface BorrowRate {
313
+ currency?: string;
314
+ rate?: number;
315
+ period?: number;
316
+ timestamp?: number;
317
+ datetime?: string;
234
318
  info: any;
235
319
  }
236
320
  export interface FundingRateHistory {
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bigone.js';
2
- import type { Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bigone
5
5
  * @augments Exchange
@@ -24,7 +24,7 @@ export default class bigone extends Exchange {
24
24
  parseType(type: string): string;
25
25
  parseOrder(order: any, market?: Market): Order;
26
26
  createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
27
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
27
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
28
28
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
29
29
  cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
30
30
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
@@ -51,29 +51,19 @@ export default class bigone extends Exchange {
51
51
  parseTransaction(transaction: any, currency?: Currency): Transaction;
52
52
  fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
53
53
  fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
54
- transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
55
- info: any;
56
- id: any;
57
- timestamp: any;
58
- datetime: any;
59
- currency: number;
60
- amount: any;
61
- fromAccount: any;
62
- toAccount: any;
63
- status: string;
64
- }>;
54
+ transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
65
55
  parseTransfer(transfer: any, currency?: Currency): {
66
56
  info: any;
67
57
  id: any;
68
58
  timestamp: any;
69
59
  datetime: any;
70
- currency: number;
60
+ currency: any;
71
61
  amount: any;
72
62
  fromAccount: any;
73
63
  toAccount: any;
74
64
  status: string;
75
65
  };
76
66
  parseTransferStatus(status: any): string;
77
- withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
67
+ withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
78
68
  handleErrors(httpCode: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
79
69
  }
package/js/src/bigone.js CHANGED
@@ -521,6 +521,7 @@ export default class bigone extends Exchange {
521
521
  * @method
522
522
  * @name bigone#fetchMarkets
523
523
  * @description retrieves data on all markets for bigone
524
+ * @see https://open.big.one/docs/spot_asset_pair.html
524
525
  * @param {object} [params] extra parameters specific to the exchange API endpoint
525
526
  * @returns {object[]} an array of objects representing market data
526
527
  */
@@ -783,6 +784,7 @@ export default class bigone extends Exchange {
783
784
  * @method
784
785
  * @name bigone#fetchTicker
785
786
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
787
+ * @see https://open.big.one/docs/spot_tickers.html
786
788
  * @param {string} symbol unified symbol of the market to fetch the ticker for
787
789
  * @param {object} [params] extra parameters specific to the exchange API endpoint
788
790
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -825,6 +827,7 @@ export default class bigone extends Exchange {
825
827
  * @method
826
828
  * @name bigone#fetchTickers
827
829
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
830
+ * @see https://open.big.one/docs/spot_tickers.html
828
831
  * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
829
832
  * @param {object} [params] extra parameters specific to the exchange API endpoint
830
833
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -912,6 +915,7 @@ export default class bigone extends Exchange {
912
915
  * @method
913
916
  * @name bigone#fetchTime
914
917
  * @description fetches the current integer timestamp in milliseconds from the exchange server
918
+ * @see https://open.big.one/docs/spot_ping.html
915
919
  * @param {object} [params] extra parameters specific to the exchange API endpoint
916
920
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
917
921
  */
@@ -932,6 +936,7 @@ export default class bigone extends Exchange {
932
936
  * @method
933
937
  * @name bigone#fetchOrderBook
934
938
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
939
+ * @see https://open.big.one/docs/contract_misc.html#get-orderbook-snapshot
935
940
  * @param {string} symbol unified symbol of the market to fetch the order book for
936
941
  * @param {int} [limit] the maximum amount of order book entries to return
937
942
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1174,6 +1179,7 @@ export default class bigone extends Exchange {
1174
1179
  * @method
1175
1180
  * @name bigone#fetchTrades
1176
1181
  * @description get the list of most recent trades for a particular symbol
1182
+ * @see https://open.big.one/docs/spot_asset_pair_trade.html
1177
1183
  * @param {string} symbol unified symbol of the market to fetch trades for
1178
1184
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1179
1185
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -1238,6 +1244,7 @@ export default class bigone extends Exchange {
1238
1244
  * @method
1239
1245
  * @name bigone#fetchOHLCV
1240
1246
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1247
+ * @see https://open.big.one/docs/spot_asset_pair_candle.html
1241
1248
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1242
1249
  * @param {string} timeframe the length of time each candle represents
1243
1250
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -1314,6 +1321,8 @@ export default class bigone extends Exchange {
1314
1321
  * @method
1315
1322
  * @name bigone#fetchBalance
1316
1323
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1324
+ * @see https://open.big.one/docs/fund_accounts.html
1325
+ * @see https://open.big.one/docs/spot_accounts.html
1317
1326
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1318
1327
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1319
1328
  */
@@ -1559,6 +1568,7 @@ export default class bigone extends Exchange {
1559
1568
  * @method
1560
1569
  * @name bigone#cancelOrder
1561
1570
  * @description cancels an open order
1571
+ * @see https://open.big.one/docs/spot_orders.html#cancel-order
1562
1572
  * @param {string} id order id
1563
1573
  * @param {string} symbol Not used by bigone cancelOrder ()
1564
1574
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1587,6 +1597,7 @@ export default class bigone extends Exchange {
1587
1597
  * @method
1588
1598
  * @name bigone#cancelAllOrders
1589
1599
  * @description cancel all open orders
1600
+ * @see https://open.big.one/docs/spot_orders.html#cancel-all-orders
1590
1601
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1591
1602
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1592
1603
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1616,6 +1627,7 @@ export default class bigone extends Exchange {
1616
1627
  * @method
1617
1628
  * @name bigone#fetchOrder
1618
1629
  * @description fetches information on an order made by the user
1630
+ * @see https://open.big.one/docs/spot_orders.html#get-one-order
1619
1631
  * @param {string} symbol not used by bigone fetchOrder
1620
1632
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1621
1633
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1631,6 +1643,7 @@ export default class bigone extends Exchange {
1631
1643
  * @method
1632
1644
  * @name bigone#fetchOrders
1633
1645
  * @description fetches information on multiple orders made by the user
1646
+ * @see https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
1634
1647
  * @param {string} symbol unified market symbol of the market orders were made in
1635
1648
  * @param {int} [since] the earliest time in ms to fetch orders for
1636
1649
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -1681,6 +1694,7 @@ export default class bigone extends Exchange {
1681
1694
  * @method
1682
1695
  * @name bigone#fetchMyTrades
1683
1696
  * @description fetch all trades made by the user
1697
+ * @see https://open.big.one/docs/spot_trade.html#trades-of-user
1684
1698
  * @param {string} symbol unified market symbol
1685
1699
  * @param {int} [since] the earliest time in ms to fetch trades for
1686
1700
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1750,6 +1764,7 @@ export default class bigone extends Exchange {
1750
1764
  * @method
1751
1765
  * @name bigone#fetchOpenOrders
1752
1766
  * @description fetch all unfilled currently open orders
1767
+ * @see https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
1753
1768
  * @param {string} symbol unified market symbol
1754
1769
  * @param {int} [since] the earliest time in ms to fetch open orders for
1755
1770
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -1766,6 +1781,7 @@ export default class bigone extends Exchange {
1766
1781
  * @method
1767
1782
  * @name bigone#fetchClosedOrders
1768
1783
  * @description fetches information on multiple closed orders made by the user
1784
+ * @see https://open.big.one/docs/spot_orders.html#get-user-orders-in-one-asset-pair
1769
1785
  * @param {string} symbol unified market symbol of the market orders were made in
1770
1786
  * @param {int} [since] the earliest time in ms to fetch orders for
1771
1787
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -1820,6 +1836,7 @@ export default class bigone extends Exchange {
1820
1836
  * @method
1821
1837
  * @name bigone#fetchDepositAddress
1822
1838
  * @description fetch the deposit address for a currency associated with this account
1839
+ * @see https://open.big.one/docs/spot_deposit.html#get-deposite-address-of-one-asset-of-user
1823
1840
  * @param {string} code unified currency code
1824
1841
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1825
1842
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -1970,6 +1987,7 @@ export default class bigone extends Exchange {
1970
1987
  * @method
1971
1988
  * @name bigone#fetchDeposits
1972
1989
  * @description fetch all deposits made to an account
1990
+ * @see https://open.big.one/docs/spot_deposit.html#deposit-of-user
1973
1991
  * @param {string} code unified currency code
1974
1992
  * @param {int} [since] the earliest time in ms to fetch deposits for
1975
1993
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -2021,6 +2039,7 @@ export default class bigone extends Exchange {
2021
2039
  * @method
2022
2040
  * @name bigone#fetchWithdrawals
2023
2041
  * @description fetch all withdrawals made from an account
2042
+ * @see https://open.big.one/docs/spot_withdrawal.html#get-withdrawals-of-user
2024
2043
  * @param {string} code unified currency code
2025
2044
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
2026
2045
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -2126,7 +2145,7 @@ export default class bigone extends Exchange {
2126
2145
  'id': undefined,
2127
2146
  'timestamp': undefined,
2128
2147
  'datetime': undefined,
2129
- 'currency': code,
2148
+ 'currency': undefined,
2130
2149
  'amount': undefined,
2131
2150
  'fromAccount': undefined,
2132
2151
  'toAccount': undefined,
@@ -2144,6 +2163,7 @@ export default class bigone extends Exchange {
2144
2163
  * @method
2145
2164
  * @name bigone#withdraw
2146
2165
  * @description make a withdrawal
2166
+ * @see https://open.big.one/docs/spot_withdrawal.html#create-withdrawal-of-user
2147
2167
  * @param {string} code unified currency code
2148
2168
  * @param {float} amount the amount to withdraw
2149
2169
  * @param {string} address the address to withdraw to
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/binance.js';
2
- import type { Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface } from './base/types.js';
2
+ import type { TransferEntry, Int, OrderSide, Balances, OrderType, Trade, OHLCV, Order, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, Str, Transaction, Ticker, OrderBook, Tickers, Market, Greeks, Strings, Currency, MarketInterface } from './base/types.js';
3
3
  /**
4
4
  * @class binance
5
5
  * @augments Exchange
@@ -21,7 +21,7 @@ export default class binance extends Exchange {
21
21
  fetchMarkets(params?: {}): Promise<any[]>;
22
22
  parseMarket(market: any): Market;
23
23
  parseBalanceHelper(entry: any): import("./base/types.js").Account;
24
- parseBalance(response: any, type?: any, marginMode?: any): Balances;
24
+ parseBalanceCustom(response: any, type?: any, marginMode?: any): Balances;
25
25
  fetchBalance(params?: {}): Promise<Balances>;
26
26
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
27
27
  parseTicker(ticker: any, market?: Market): Ticker;
@@ -48,15 +48,15 @@ export default class binance extends Exchange {
48
48
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
49
49
  parseTrade(trade: any, market?: Market): Trade;
50
50
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
51
- editSpotOrder(id: string, symbol: any, type: any, side: any, amount: any, price?: any, params?: {}): Promise<Order>;
52
- editSpotOrderRequest(id: string, symbol: any, type: any, side: any, amount: any, price?: any, params?: {}): any;
53
- editContractOrder(id: string, symbol: any, type: any, side: any, amount: any, price?: any, params?: {}): Promise<Order>;
51
+ editSpotOrder(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): Promise<Order>;
52
+ editSpotOrderRequest(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): any;
53
+ editContractOrder(id: string, symbol: any, type: any, side: any, amount: number, price?: number, params?: {}): Promise<Order>;
54
54
  editOrder(id: string, symbol: any, type: any, side: any, amount?: any, price?: any, params?: {}): Promise<Order>;
55
55
  parseOrderStatus(status: any): string;
56
56
  parseOrder(order: any, market?: Market): Order;
57
57
  createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
58
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
59
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): any;
58
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
59
+ createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
60
60
  createMarketOrderWithCost(symbol: string, side: OrderSide, cost: any, params?: {}): Promise<Order>;
61
61
  createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
62
62
  createMarketSellOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
@@ -114,17 +114,7 @@ export default class binance extends Exchange {
114
114
  id: string;
115
115
  amount: number;
116
116
  };
117
- transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
118
- info: any;
119
- id: string;
120
- timestamp: number;
121
- datetime: string;
122
- currency: string;
123
- amount: number;
124
- fromAccount: any;
125
- toAccount: any;
126
- status: string;
127
- }>;
117
+ transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
128
118
  fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
129
119
  fetchDepositAddress(code: string, params?: {}): Promise<{
130
120
  currency: string;
@@ -140,7 +130,7 @@ export default class binance extends Exchange {
140
130
  }>;
141
131
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
142
132
  parseDepositWithdrawFee(fee: any, currency?: Currency): any;
143
- withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
133
+ withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
144
134
  parseTradingFee(fee: any, market?: Market): {
145
135
  info: any;
146
136
  symbol: string;
@@ -269,7 +259,7 @@ export default class binance extends Exchange {
269
259
  fetchAccountPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
270
260
  fetchPositionsRisk(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
271
261
  fetchFundingHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").FundingHistory[]>;
272
- setLeverage(leverage: any, symbol?: Str, params?: {}): Promise<any>;
262
+ setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
273
263
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
274
264
  setPositionMode(hedged: any, symbol?: Str, params?: {}): Promise<any>;
275
265
  fetchSettlementHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
@@ -310,7 +300,7 @@ export default class binance extends Exchange {
310
300
  getExceptionsByUrl(url: any, exactOrBroad: any): any;
311
301
  handleErrors(code: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
312
302
  calculateRateLimiterCost(api: any, method: any, path: any, params: any, config?: {}): any;
313
- request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}, context?: {}): Promise<any>;
303
+ request(path: any, api?: string, method?: string, params?: {}, headers?: any, body?: any, config?: {}): Promise<any>;
314
304
  modifyMarginHelper(symbol: string, amount: any, addOrReduce: any, params?: {}): Promise<any>;
315
305
  parseMarginModification(data: any, market?: Market): {
316
306
  info: any;
@@ -380,7 +370,7 @@ export default class binance extends Exchange {
380
370
  datetime: any;
381
371
  info: any;
382
372
  }>;
383
- borrowCrossMargin(code: string, amount: any, params?: {}): Promise<{
373
+ borrowCrossMargin(code: string, amount: number, params?: {}): Promise<{
384
374
  id: number;
385
375
  currency: string;
386
376
  amount: any;
@@ -389,7 +379,7 @@ export default class binance extends Exchange {
389
379
  datetime: any;
390
380
  info: any;
391
381
  }>;
392
- borrowIsolatedMargin(symbol: string, code: string, amount: any, params?: {}): Promise<{
382
+ borrowIsolatedMargin(symbol: string, code: string, amount: number, params?: {}): Promise<{
393
383
  id: number;
394
384
  currency: string;
395
385
  amount: any;
package/js/src/binance.js CHANGED
@@ -3139,7 +3139,7 @@ export default class binance extends Exchange {
3139
3139
  account['debt'] = Precise.stringAdd(debt, interest);
3140
3140
  return account;
3141
3141
  }
3142
- parseBalance(response, type = undefined, marginMode = undefined) {
3142
+ parseBalanceCustom(response, type = undefined, marginMode = undefined) {
3143
3143
  const result = {
3144
3144
  'info': response,
3145
3145
  };
@@ -3482,7 +3482,7 @@ export default class binance extends Exchange {
3482
3482
  // }
3483
3483
  // ]
3484
3484
  //
3485
- return this.parseBalance(response, type, marginMode);
3485
+ return this.parseBalanceCustom(response, type, marginMode);
3486
3486
  }
3487
3487
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
3488
3488
  /**
@@ -5254,7 +5254,7 @@ export default class binance extends Exchange {
5254
5254
  const stopLossPrice = this.safeValue(params, 'stopLossPrice', triggerPrice); // fallback to stopLoss
5255
5255
  const takeProfitPrice = this.safeValue(params, 'takeProfitPrice');
5256
5256
  const trailingDelta = this.safeValue(params, 'trailingDelta');
5257
- const trailingTriggerPrice = this.safeString2(params, 'trailingTriggerPrice', 'activationPrice', price);
5257
+ const trailingTriggerPrice = this.safeString2(params, 'trailingTriggerPrice', 'activationPrice', this.numberToString(price));
5258
5258
  const trailingPercent = this.safeString2(params, 'trailingPercent', 'callbackRate');
5259
5259
  const isTrailingPercentOrder = trailingPercent !== undefined;
5260
5260
  const isStopLoss = stopLossPrice !== undefined || trailingDelta !== undefined;
@@ -5856,7 +5856,7 @@ export default class binance extends Exchange {
5856
5856
  params = this.omit(params, 'type');
5857
5857
  const orders = await this.fetchOrders(symbol, since, undefined, params);
5858
5858
  const filteredOrders = this.filterBy(orders, 'status', 'canceled');
5859
- return this.filterByLimit(filteredOrders, limit);
5859
+ return this.filterBySinceLimit(filteredOrders, since, limit);
5860
5860
  }
5861
5861
  async cancelOrder(id, symbol = undefined, params = {}) {
5862
5862
  /**
@@ -9587,7 +9587,7 @@ export default class binance extends Exchange {
9587
9587
  }
9588
9588
  return this.safeValue(config, 'cost', 1);
9589
9589
  }
9590
- async request(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined, config = {}, context = {}) {
9590
+ async request(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined, config = {}) {
9591
9591
  const response = await this.fetch2(path, api, method, params, headers, body, config);
9592
9592
  // a workaround for {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."}
9593
9593
  if (api === 'private') {
@@ -10220,6 +10220,7 @@ export default class binance extends Exchange {
10220
10220
  else {
10221
10221
  return this.parseOpenInterest(response, market);
10222
10222
  }
10223
+ return undefined;
10223
10224
  }
10224
10225
  parseOpenInterest(interest, market = undefined) {
10225
10226
  const timestamp = this.safeInteger2(interest, 'timestamp', 'time');
package/js/src/bingx.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bingx.js';
2
- import type { Int, OrderSide, OHLCV, FundingRateHistory, Order, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position } from './base/types.js';
2
+ import type { TransferEntry, Int, OrderSide, OHLCV, FundingRateHistory, Order, OrderType, OrderRequest, Str, Trade, Balances, Transaction, Ticker, OrderBook, Tickers, Market, Strings, Currency, Position } from './base/types.js';
3
3
  /**
4
4
  * @class bingx
5
5
  * @augments Exchange
@@ -69,8 +69,8 @@ export default class bingx extends Exchange {
69
69
  createMarketOrderWithCost(symbol: string, side: OrderSide, cost: any, params?: {}): Promise<Order>;
70
70
  createMarketBuyOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
71
71
  createMarketSellOrderWithCost(symbol: string, cost: any, params?: {}): Promise<Order>;
72
- createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): any;
73
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
72
+ createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): any;
73
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
74
74
  createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
75
75
  parseOrderSide(side: any): string;
76
76
  parseOrder(order: any, market?: Market): Order;
@@ -81,17 +81,7 @@ export default class bingx extends Exchange {
81
81
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
82
82
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
83
83
  fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
84
- transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
85
- info: any;
86
- id: string;
87
- timestamp: any;
88
- datetime: any;
89
- currency: string;
90
- amount: any;
91
- fromAccount: any;
92
- toAccount: any;
93
- status: any;
94
- }>;
84
+ transfer(code: string, amount: number, fromAccount: any, toAccount: any, params?: {}): Promise<TransferEntry>;
95
85
  fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
96
86
  parseTransfer(transfer: any, currency?: Currency): {
97
87
  info: any;
@@ -119,7 +109,7 @@ export default class bingx extends Exchange {
119
109
  setMarginMode(marginMode: string, symbol?: Str, params?: {}): Promise<any>;
120
110
  setMargin(symbol: string, amount: any, params?: {}): Promise<any>;
121
111
  fetchLeverage(symbol: string, params?: {}): Promise<any>;
122
- setLeverage(leverage: any, symbol?: Str, params?: {}): Promise<any>;
112
+ setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
123
113
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
124
114
  parseDepositWithdrawFee(fee: any, currency?: Currency): {
125
115
  info: any;
@@ -134,7 +124,7 @@ export default class bingx extends Exchange {
134
124
  networks: {};
135
125
  };
136
126
  fetchDepositWithdrawFees(codes?: Strings, params?: {}): Promise<any>;
137
- withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<void>;
127
+ withdraw(code: string, amount: number, address: any, tag?: any, params?: {}): Promise<Transaction>;
138
128
  parseParams(params: any): {};
139
129
  fetchMyLiquidations(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<import("./base/types.js").Liquidation[]>;
140
130
  parseLiquidation(liquidation: any, market?: Market): import("./base/types.js").Liquidation;
package/js/src/bingx.js CHANGED
@@ -1888,6 +1888,7 @@ export default class bingx extends Exchange {
1888
1888
  }
1889
1889
  }
1890
1890
  if (isStopLoss || isTakeProfit) {
1891
+ const stringifiedAmount = this.numberToString(amount);
1891
1892
  if (isStopLoss) {
1892
1893
  const slTriggerPrice = this.safeString2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
1893
1894
  const slWorkingType = this.safeString(stopLoss, 'workingType', 'MARK_PRICE');
@@ -1901,7 +1902,7 @@ export default class bingx extends Exchange {
1901
1902
  if (slPrice !== undefined) {
1902
1903
  slRequest['price'] = this.parseToNumeric(this.priceToPrecision(symbol, slPrice));
1903
1904
  }
1904
- const slQuantity = this.safeString(stopLoss, 'quantity', amount);
1905
+ const slQuantity = this.safeString(stopLoss, 'quantity', stringifiedAmount);
1905
1906
  slRequest['quantity'] = this.parseToNumeric(this.amountToPrecision(symbol, slQuantity));
1906
1907
  request['stopLoss'] = this.json(slRequest);
1907
1908
  }
@@ -1918,7 +1919,7 @@ export default class bingx extends Exchange {
1918
1919
  if (slPrice !== undefined) {
1919
1920
  tpRequest['price'] = this.parseToNumeric(this.priceToPrecision(symbol, slPrice));
1920
1921
  }
1921
- const tkQuantity = this.safeString(takeProfit, 'quantity', amount);
1922
+ const tkQuantity = this.safeString(takeProfit, 'quantity', stringifiedAmount);
1922
1923
  tpRequest['quantity'] = this.parseToNumeric(this.amountToPrecision(symbol, tkQuantity));
1923
1924
  request['takeProfit'] = this.json(tpRequest);
1924
1925
  }
@@ -3604,7 +3605,7 @@ export default class bingx extends Exchange {
3604
3605
  // "id":"1197073063359000577"
3605
3606
  // }
3606
3607
  // }
3607
- this.parseTransaction(data);
3608
+ return this.parseTransaction(data);
3608
3609
  }
3609
3610
  parseParams(params) {
3610
3611
  const sortedParams = this.keysort(params);
package/js/src/bit2c.d.ts CHANGED
@@ -13,7 +13,7 @@ export default class bit2c extends Exchange {
13
13
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
14
14
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
15
15
  fetchTradingFees(params?: {}): Promise<{}>;
16
- createOrder(symbol: string, type: OrderType, side: OrderSide, amount: any, price?: any, params?: {}): Promise<Order>;
16
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
17
17
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
18
18
  fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
19
19
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;