refactoring in new classes around consistency. Add spotv3 REST client

This commit is contained in:
tiagosiebler
2022-09-10 12:23:32 +01:00
parent a1c0887417
commit 3a984594dc
14 changed files with 365 additions and 95 deletions

View File

@@ -28,8 +28,8 @@ describe('Private Copy Trading REST API Endpoints', () => {
});
});
it('getBalance()', async () => {
expect(await api.getBalance()).toMatchObject({
it('getBalances()', async () => {
expect(await api.getBalances()).toMatchObject({
retCode: API_ERROR_CODE.INCORRECT_API_KEY_PERMISSIONS,
});
});

View File

@@ -8,8 +8,8 @@ describe('Public Copy Trading REST API Endpoints', () => {
const api = new CopyTradingClient(API_KEY, API_SECRET, useLivenet);
it('getSymbolList()', async () => {
expect(await api.getSymbolList()).toMatchObject({
it('getSymbols()', async () => {
expect(await api.getSymbols()).toMatchObject({
result: {
list: expect.any(Array),
},

View File

@@ -48,8 +48,8 @@ describe('Private Account Asset REST API Endpoints', () => {
);
});
it('getBalance()', async () => {
expect(await api.getBalance()).toMatchObject(successUSDCResponseObject());
it('getBalances()', async () => {
expect(await api.getBalances()).toMatchObject(successUSDCResponseObject());
});
it('getAssetInfo()', async () => {

View File

@@ -40,8 +40,8 @@ describe('Private Account Asset REST API Endpoints', () => {
);
});
it('getBalance()', async () => {
expect(await api.getBalance()).toMatchObject(successUSDCResponseObject());
it('getBalances()', async () => {
expect(await api.getBalances()).toMatchObject(successUSDCResponseObject());
});
it('getAssetInfo()', async () => {

View File

@@ -35,8 +35,8 @@ describe('Public USDC Options REST API Endpoints', () => {
);
});
it('getKline()', async () => {
expect(await api.getKline(candleRequest)).toMatchObject(
it('getCandles()', async () => {
expect(await api.getCandles(candleRequest)).toMatchObject(
successUSDCResponseObject()
);
});