okx-api 1.3.6 → 1.4.0

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 (51) hide show
  1. package/README.md +22 -11
  2. package/lib/rest-client.d.ts +523 -43
  3. package/lib/rest-client.js +600 -48
  4. package/lib/rest-client.js.map +1 -1
  5. package/lib/types/rest/request/account.d.ts +93 -0
  6. package/lib/types/rest/request/block-trading.d.ts +16 -0
  7. package/lib/types/rest/request/copy-trading.d.ts +117 -0
  8. package/lib/types/rest/request/copy-trading.js +3 -0
  9. package/lib/types/rest/request/copy-trading.js.map +1 -0
  10. package/lib/types/rest/request/funding.d.ts +7 -0
  11. package/lib/types/rest/request/grid-trading.d.ts +14 -0
  12. package/lib/types/rest/request/index.d.ts +5 -0
  13. package/lib/types/rest/request/index.js +5 -0
  14. package/lib/types/rest/request/index.js.map +1 -1
  15. package/lib/types/rest/request/public.d.ts +40 -0
  16. package/lib/types/rest/request/recurring-buy.d.ts +28 -0
  17. package/lib/types/rest/request/recurring-buy.js +3 -0
  18. package/lib/types/rest/request/recurring-buy.js.map +1 -0
  19. package/lib/types/rest/request/signal-bot.d.ts +97 -0
  20. package/lib/types/rest/request/signal-bot.js +3 -0
  21. package/lib/types/rest/request/signal-bot.js.map +1 -0
  22. package/lib/types/rest/request/simple-earn.d.ts +23 -0
  23. package/lib/types/rest/request/simple-earn.js +3 -0
  24. package/lib/types/rest/request/simple-earn.js.map +1 -0
  25. package/lib/types/rest/request/spread-trading.d.ts +69 -0
  26. package/lib/types/rest/request/spread-trading.js +3 -0
  27. package/lib/types/rest/request/spread-trading.js.map +1 -0
  28. package/lib/types/rest/request/subaccount.d.ts +21 -0
  29. package/lib/types/rest/request/trade.d.ts +4 -0
  30. package/lib/types/rest/response/index.d.ts +4 -0
  31. package/lib/types/rest/response/index.js +4 -0
  32. package/lib/types/rest/response/index.js.map +1 -1
  33. package/lib/types/rest/response/private-account.d.ts +113 -0
  34. package/lib/types/rest/response/private-block-trading.d.ts +35 -0
  35. package/lib/types/rest/response/private-copy-trading.d.ts +259 -0
  36. package/lib/types/rest/response/private-copy-trading.js +3 -0
  37. package/lib/types/rest/response/private-copy-trading.js.map +1 -0
  38. package/lib/types/rest/response/private-funding.d.ts +14 -0
  39. package/lib/types/rest/response/private-recurring-buy.d.ts +63 -0
  40. package/lib/types/rest/response/private-recurring-buy.js +3 -0
  41. package/lib/types/rest/response/private-recurring-buy.js.map +1 -0
  42. package/lib/types/rest/response/private-signal-bot.d.ts +22 -0
  43. package/lib/types/rest/response/private-signal-bot.js +3 -0
  44. package/lib/types/rest/response/private-signal-bot.js.map +1 -0
  45. package/lib/types/rest/response/private-spread-trading.d.ts +125 -0
  46. package/lib/types/rest/response/private-spread-trading.js +3 -0
  47. package/lib/types/rest/response/private-spread-trading.js.map +1 -0
  48. package/lib/types/rest/response/private-subaccount.d.ts +16 -0
  49. package/lib/types/rest/response/private-trade.d.ts +5 -0
  50. package/lib/types/rest/response/public-data.d.ts +27 -0
  51. package/package.json +1 -1
package/README.md CHANGED
@@ -2,11 +2,18 @@
2
2
 
3
3
  [![E2E Tests](https://github.com/tiagosiebler/okx-api/actions/workflows/e2etest.yml/badge.svg?branch=master)](https://github.com/tiagosiebler/okx-api/actions/workflows/e2etest.yml) [![npm downloads](https://img.shields.io/npm/dt/okx-api)][1] [![npm version](https://img.shields.io/npm/v/okx-api)][1] [![npm size](https://img.shields.io/bundlephobia/min/okx-api/latest)][1] [![last commit](https://img.shields.io/github/last-commit/tiagosiebler/okx-api)][1] [![CodeFactor](https://www.codefactor.io/repository/github/tiagosiebler/okx-api/badge)](https://www.codefactor.io/repository/github/tiagosiebler/okx-api)
4
4
 
5
- [![okx okex SDK for nodejs rest & websockets api](https://github.com/tiagosiebler/okx-api/blob/master/docs/images/logo2.png?raw=true)][1]
5
+ <p align="center">
6
+ <a href="https://www.npmjs.com/package/okx-api">
7
+ <picture>
8
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/tiagosiebler/okx-api/blob/master/docs/images/logoDarkMode2.svg?raw=true#gh-dark-mode-only">
9
+ <img alt="SDK Logo" src="https://github.com/tiagosiebler/okx-api/blob/master/docs/images/logoBrightMode2.svg?raw=true#gh-light-mode-only">
10
+ </picture>
11
+ </a>
12
+ </p>
6
13
 
7
14
  [1]: https://www.npmjs.com/package/okx-api
8
15
 
9
- Complete, updated & performant node.js SDK for the OKX(OKEX) APIs and WebSockets:
16
+ Complete, updated & performant Node.js SDK for the OKX(OKEX) APIs and WebSockets:
10
17
 
11
18
  - Complete integration with all OKX APIs, including the v5 APIs.
12
19
  - TypeScript support (with type declarations for most API requests & responses).
@@ -30,16 +37,20 @@ npm install okx-api
30
37
 
31
38
  ## Related projects
32
39
 
33
- - Try my connectors:
34
- - [binance](https://www.npmjs.com/package/binance)
35
- - [bybit-api](https://www.npmjs.com/package/bybit-api)
36
- - [bitget-api](https://www.npmjs.com/package/bitget-api)
37
- - [okx-api](https://www.npmjs.com/package/okx-api)
38
- - [ftx-api](https://www.npmjs.com/package/ftx-api)
40
+ Check out my related JavaScript/TypeScript/Node.js projects:
41
+
42
+ - Try my REST API & WebSocket SDKs:
43
+ - [Bybit-api Node.js SDK](https://www.npmjs.com/package/bybit-api)
44
+ - [Binance Node.js SDK](https://www.npmjs.com/package/binance)
45
+ - [Okx-api Node.js SDK](https://www.npmjs.com/package/okx-api)
46
+ - [Gateio-api Node.js SDK](https://www.npmjs.com/package/gateio-api)
47
+ - [Bitget-api Node.js SDK](https://www.npmjs.com/package/bitget-api)
48
+ - [Bitmart-api Node.js SDK](https://www.npmjs.com/package/bitmart-api)
39
49
  - Try my misc utilities:
40
- - [orderbooks](https://www.npmjs.com/package/orderbooks)
50
+ - [OrderBooks Node.js](https://www.npmjs.com/package/orderbooks)
51
+ - [Crypto Exchange Account State Cache](https://www.npmjs.com/package/accountstate)
41
52
  - Check out my examples:
42
- - [awesome-crypto-examples](https://github.com/tiagosiebler/awesome-crypto-examples)
53
+ - [awesome-crypto-examples Node.js](https://github.com/tiagosiebler/awesome-crypto-examples)
43
54
 
44
55
  ## Documentation
45
56
 
@@ -169,4 +180,4 @@ The bundle can be found in `dist/`. Altough usage should be largely consistent,
169
180
 
170
181
  ## Star History
171
182
 
172
- [![Star History Chart](https://api.star-history.com/svg?repos=tiagosiebler/bitget-api,tiagosiebler/bybit-api,tiagosiebler/binance,tiagosiebler/orderbooks,tiagosiebler/okx-api,tiagosiebler/awesome-crypto-examples&type=Date)](https://star-history.com/#tiagosiebler/bybit-api&tiagosiebler/binance&tiagosiebler/orderbooks&tiagosiebler/okx-api&tiagosiebler/bitget-api&tiagosiebler/awesome-crypto-examples&tiagosiebler/ftx-api&Date)
183
+ [![Star History Chart](https://api.star-history.com/svg?repos=tiagosiebler/bybit-api,tiagosiebler/binance,tiagosiebler/orderbooks,tiagosiebler/okx-api,tiagosiebler/bitget-api,tiagosiebler/awesome-crypto-examples,tiagosiebler/bitmart-api,tiagosiebler/gateio-api&type=Date)](https://star-history.com/#tiagosiebler/bybit-api&tiagosiebler/binance&tiagosiebler/orderbooks&tiagosiebler/okx-api&tiagosiebler/bitget-api&tiagosiebler/awesome-crypto-examples&tiagosiebler/bitmart-api&tiagosiebler/gateio-api&Date)