rename option client. update docs

This commit is contained in:
tiagosiebler
2022-09-08 18:34:49 +01:00
parent 557ddc90f5
commit c100c4af6f
5 changed files with 21 additions and 18 deletions

View File

@@ -42,13 +42,16 @@ Most methods accept JS objects. These can be populated using parameters specifie
## REST Clients ## REST Clients
Each REST API category has a dedicated REST client. Here are the REST clients and their API group: Each REST API category has a dedicated REST client. Here are the REST clients and their API group:
| Class | Description | | Class | Description |
|:-----------------------------------------------------: |:-----------------------------------------------------------------------------------------------------: | |:-----------------------------------------------------: |:-----------------------------------------------------------------------------------------------------------: |
| [InverseClient](src/inverse-client.ts) | [Inverse Perpetual Futures (v2)](https://bybit-exchange.github.io/docs/futuresV2/inverse/) | | [InverseClient](src/inverse-client.ts) | [Inverse Perpetual Futures (v2) APIs](https://bybit-exchange.github.io/docs/futuresV2/inverse/) |
| [LinearClient](src/linear-client.ts) | [USDT Perpetual Futures (v2)](https://bybit-exchange.github.io/docs/futuresV2/linear/#t-introduction) | | [LinearClient](src/linear-client.ts) | [USDT Perpetual Futures (v2) APIs](https://bybit-exchange.github.io/docs/futuresV2/linear/#t-introduction) |
| [InverseFuturesClient](src/inverse-futures-client.ts) | [Inverse Futures (v2)](https://bybit-exchange.github.io/docs/futuresV2/inverse_futures/#t-introduction) | | [InverseFuturesClient](src/inverse-futures-client.ts) | [Inverse Futures (v2) APIs](https://bybit-exchange.github.io/docs/futuresV2/inverse_futures/#t-introduction) |
| [SpotClient](src/spot-client.ts) | [Spot Markets](https://bybit-exchange.github.io/docs/spot/#t-introduction) | | [SpotClient](src/spot-client.ts) | [Spot Market APIs](https://bybit-exchange.github.io/docs/spot/#t-introduction) |
| [AccountAssetClient](src/account-asset-client.ts) | [Account Asset API](https://bybit-exchange.github.io/docs/account_asset/#t-introduction) | | [AccountAssetClient](src/account-asset-client.ts) | [Account Asset APIs](https://bybit-exchange.github.io/docs/account_asset/#t-introduction) |
| USDC Options & Perpetual Contracts | Under Development | | [USDC Perpetual](src/usdc-perpetual-client.ts) | [USDC Perpetual APIs](https://bybit-exchange.github.io/docs/usdc/option/?console#t-querydeliverylog) |
| [USDC Option](src/usdc-options-client.ts) | [USDC Option APIs](https://bybit-exchange.github.io/docs/usdc/option/#t-introduction) |
| [AccountAssetClient](src/account-asset-client.ts) | [Account Asset APIs](https://bybit-exchange.github.io/docs/account_asset/#t-introduction) |
| Spot v3 | Under Development |
| Derivatives V3 unified margin | Under Development | | Derivatives V3 unified margin | Under Development |
| [WebsocketClient](src/websocket-client.ts) | All WebSocket Events (Public & Private for all API categories) | | [WebsocketClient](src/websocket-client.ts) | All WebSocket Events (Public & Private for all API categories) |

View File

@@ -23,9 +23,9 @@ import { REST_CLIENT_TYPE_ENUM } from './util';
import BaseRestClient from './util/BaseRestClient'; import BaseRestClient from './util/BaseRestClient';
/** /**
* REST API client for USDC Options APIs * REST API client for USDC Option APIs
*/ */
export class USDCOptionsClient extends BaseRestClient { export class USDCOptionClient extends BaseRestClient {
getClientType() { getClientType() {
return REST_CLIENT_TYPE_ENUM.usdc; return REST_CLIENT_TYPE_ENUM.usdc;
} }

View File

@@ -1,4 +1,4 @@
import { USDCOptionsClient } from '../../../src'; import { USDCOptionClient } from '../../../src';
import { import {
successResponseObject, successResponseObject,
successUSDCResponseObject, successUSDCResponseObject,
@@ -15,7 +15,7 @@ describe('Private Account Asset REST API Endpoints', () => {
expect(API_SECRET).toStrictEqual(expect.any(String)); expect(API_SECRET).toStrictEqual(expect.any(String));
}); });
const api = new USDCOptionsClient(API_KEY, API_SECRET, useLivenet); const api = new USDCOptionClient(API_KEY, API_SECRET, useLivenet);
const category = 'OPTION'; const category = 'OPTION';
it('getActiveRealtimeOrders()', async () => { it('getActiveRealtimeOrders()', async () => {

View File

@@ -1,4 +1,4 @@
import { API_ERROR_CODE, USDCOptionsClient } from '../../../src'; import { API_ERROR_CODE, USDCOptionClient } from '../../../src';
import { successUSDCResponseObject } from '../../response.util'; import { successUSDCResponseObject } from '../../response.util';
describe('Private Account Asset REST API Endpoints', () => { describe('Private Account Asset REST API Endpoints', () => {
@@ -11,7 +11,7 @@ describe('Private Account Asset REST API Endpoints', () => {
expect(API_SECRET).toStrictEqual(expect.any(String)); expect(API_SECRET).toStrictEqual(expect.any(String));
}); });
const api = new USDCOptionsClient(API_KEY, API_SECRET, useLivenet); const api = new USDCOptionClient(API_KEY, API_SECRET, useLivenet);
const currency = 'USDC'; const currency = 'USDC';
const symbol = 'BTC-30SEP22-400000-C'; const symbol = 'BTC-30SEP22-400000-C';

View File

@@ -1,4 +1,4 @@
import { USDCOptionsClient } from '../../../src'; import { USDCOptionClient } from '../../../src';
import { import {
successResponseObject, successResponseObject,
successUSDCResponseObject, successUSDCResponseObject,
@@ -9,7 +9,7 @@ describe('Public USDC Options REST API Endpoints', () => {
const API_KEY = undefined; const API_KEY = undefined;
const API_SECRET = undefined; const API_SECRET = undefined;
const api = new USDCOptionsClient(API_KEY, API_SECRET, useLivenet); const api = new USDCOptionClient(API_KEY, API_SECRET, useLivenet);
const symbol = 'BTC-30SEP22-400000-C'; const symbol = 'BTC-30SEP22-400000-C';
it('getOrderBook()', async () => { it('getOrderBook()', async () => {