You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(v3.0.2): enhance README with detailed usage instructions, and reintroduce .gitignore file. Refactor BrokerClient to include additional API methods and improve documentation for WebSocket clients.
Refer to the [examples](./examples) folder for implementation demos.
84
+
42
85
## Issues & Discussion
43
86
44
87
- Issues? Check the [issues tab](https://github.com/tiagosiebler/bitget-api/issues).
@@ -69,11 +112,14 @@ Check out my related JavaScript/TypeScript/Node.js projects:
69
112
70
113
## Documentation
71
114
72
-
Most methods pass values as-is into HTTP requests. These can be populated using parameters specified by Bitget's API documentation, or check the type definition in each class within this repository (see table below for convenient links to each class).
115
+
Most methods accept JS objects. These can be populated using parameters specified by Bitget's API documentation, or check the type definition in each class within this repository (see table below for convenient links to each class).
73
116
74
-
-[Bitget API V2 Documentation](https://www.bitget.com/api-doc/common/intro).
75
-
-[Bitget API V3/UTA Documentation](https://www.bitget.com/api-doc/uta/intro).
117
+
- Bitget API Documentation
118
+
-[V3/UTA API Documentation](https://www.bitget.com/api-doc/uta/intro) (Latest - Unified Trading Account)
119
+
-[V2 API Documentation](https://www.bitget.com/api-doc/common/intro)
120
+
-[Legacy V1 API Documentation](https://bitgetlimited.github.io/apidoc/en/spot/#introduction) (deprecated)
76
121
-[REST Endpoint Function List](./docs/endpointFunctionList.md)
122
+
-[TSDoc Documentation (autogenerated using typedoc)](https://tsdocs.dev/docs/bitget-api)
77
123
78
124
## Structure
79
125
@@ -88,6 +134,13 @@ The version on npm is the output from the `build` command and can be used in pro
88
134
89
135
---
90
136
137
+
# Usage
138
+
139
+
Create API credentials at Bitget:
140
+
141
+
-[Livenet API Management](https://www.bitget.com/en/support/articles/360011132814-How-to-create-API)
Each REST API group has a dedicated REST client. To avoid confusion, here are the available REST clients and the corresponding API groups:
@@ -110,12 +163,18 @@ Examples for using each client can be found in:
110
163
111
164
If you're missing an example, you're welcome to request one. Priority will be given to [github sponsors](https://github.com/sponsors/tiagosiebler).
112
165
113
-
### Usage
114
-
115
-
First, create API credentials on Bitget's website.
166
+
### Getting Started
116
167
117
168
All REST APIs are integrated in each dedicated Rest Client class. See the above table for which REST client to use. If you've upgraded to the Unified Trading Account, you should use the V3 REST APIs and WebSockets.
118
169
170
+
There are several REST API modules as there are some differences in each API group:
171
+
172
+
1.`RestClientV3` for the latest V3/UTA APIs (Unified Trading Account) - recommended for new projects.
173
+
2.`RestClientV2` for V2 APIs - use if you haven't upgraded to UTA yet.
174
+
3. Legacy V1 clients (`SpotClient`, `FuturesClient`, `BrokerClient`) - deprecated, migrate to V2 or V3.
175
+
176
+
More Node.js & JavaScript examples for Bitget's REST APIs & WebSockets can be found in the [examples](./examples) folder on GitHub.
177
+
119
178
#### V3 REST APIs
120
179
121
180
These are only available if you have upgraded to the Unified Trading Account. If not, use the V2 APIs instead.
@@ -198,21 +257,30 @@ client
198
257
});
199
258
```
200
259
201
-
####WebSockets
260
+
## WebSockets
202
261
203
262
All WebSocket functionality is supported via the WebsocketClient. Since there are currently 3 generations of Bitget's API, there are 3 WebsocketClient classes in this Node.js, JavaScript & TypeScript SDK for Bitget.
204
263
205
264
Use the following guidance to decide which one to use:
0 commit comments