rename option client. update docs
This commit is contained in:
17
README.md
17
README.md
@@ -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) |
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 () => {
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
@@ -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 () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user