@exchange-connect/coinex
Version:
Coinex ( https://www.coinex.com ) SDK
97 lines (68 loc) • 3.51 kB
Markdown
# Exchange Connect
## Coinex Software Development Kit
### This is a module or a part of **Exchange Connect** project and you can use it seperatly for the Coinex Exchange
- You are allowed to interact with Advanced ( raw ) APIs through SDK functions
- Catching an well-defined error by type
- Integrating in your Javascript apps flawlessly
- No need to handling WebSocket connections by your own. it's already done!
## Usage
> Be Cautious: It's currently under development
Installation:
```bash
npm i --save @exchange-connect/coinex
```
Use SDK:
```javascript
const CoinexSDK = require("@exchange-connect/coinex");
const coinex = new CoinexSDK("YOUR_API_KEY", "YOUR_API_SECRET");
const { INVALID_METHOD } = coinex.errors;
const { acquireAllMarketInfo } = coinex.https;
const { futuresAssetSubscribe } = coinex.streams;
//Access All of the HTTP/Rest APIs with "CoinexSDK.http"
//For Example
try{
const allTheMarkets = await acquireAllMarketInfo();
}catch(error){
//And Even you can recogonize the error just simply by the "instanceof" from the error section
if(error instanceof INVALID_METHOD){
//Handle the error
}
//Look at the "API Refrence" for more information
}
```
## API Refrence
See [API Refrence](https://exchange-connect.github.io/Coinex/) For more information on SDK.
## Folder Structure
```
src/ Source code
├─ constants/ Constant variables
├─ errors/ Classified-Errors folder
│ ├─ http/ Server-Generated HTTP Response Errors
│ ├─ stream/ Server-Generated Web Socket Errors
├─ http/ HTTP API Requests
│ ├─ account/ "account" Requests
│ ├─ futures/ "futures" Requests
│ ├─ market/ "market" Requests
│ ├─ spot/ "spot" Requests
│ ├─ trading/ "trading" Requests
├─ stream/ Web Socket Functionalities
│ ├─ futures/ Futures WS Functions
│ ├─ spot/ Spot WS Functions
docs/ JSDoc-Generated Documentations
```
## Roadmap
- [x] Full Rest API Support 
- [x] Account 
- [x] Futures 
- [x] Market 
- [x] Trading 
- [x] Spot 
- [x] Full WebSocket API Support 
- [x] Futures 
- [x] Spot 
- [x] Document All of the SDKs 
- [x] HTTP API 
- [x] Web Socket API 
- [x] Error handling 
- [x] Error types 
- [ ] Rate Limiter 