feat(): add new futures endpoints & add new req property (clientOid)

This commit is contained in:
Tiago Siebler
2023-03-22 17:00:59 +00:00
parent b92739de97
commit 831689e857
13 changed files with 235 additions and 133 deletions

View File

@@ -163,7 +163,7 @@ describe('Private Spot REST API GET Endpoints', () => {
it('getCurrentPlanOrders()', async () => {
try {
expect(
await api.getCurrentPlanOrders({ symbol, pageSize: '20' })
await api.getCurrentPlanOrders({ symbol, pageSize: '20' }),
).toMatchObject({
...sucessEmptyResponseObject(),
data: {
@@ -185,7 +185,7 @@ describe('Private Spot REST API GET Endpoints', () => {
pageSize: '20',
startTime: '1667889483000',
endTime: '1668134732000',
})
}),
).toMatchObject({
...sucessEmptyResponseObject(),
data: {

View File

@@ -30,7 +30,7 @@ describe('Private Spot REST API POST Endpoints', () => {
coin,
fromType: 'spot',
toType: 'mix_usdt',
})
}),
).toStrictEqual('');
} catch (e) {
// console.error('transfer: ', e);
@@ -49,7 +49,7 @@ describe('Private Spot REST API POST Endpoints', () => {
coin,
fromType: 'spot',
toType: 'mix_usdt',
})
}),
).toStrictEqual('');
} catch (e) {
// console.error('transferV2: ', e);
@@ -71,7 +71,7 @@ describe('Private Spot REST API POST Endpoints', () => {
coin,
fromType: 'spot',
toType: 'mix_usdt',
})
}),
).toStrictEqual('');
} catch (e) {
// console.error('transferV2: ', e);
@@ -90,7 +90,7 @@ describe('Private Spot REST API POST Endpoints', () => {
coin,
chain: 'TRC20',
address: `123456`,
})
}),
).toMatchObject({
...sucessEmptyResponseObject(),
data: expect.any(Array),
@@ -110,7 +110,7 @@ describe('Private Spot REST API POST Endpoints', () => {
coin,
chain: 'TRC20',
address: `123456`,
})
}),
).toMatchObject({
...sucessEmptyResponseObject(),
data: expect.any(Array),
@@ -158,7 +158,7 @@ describe('Private Spot REST API POST Endpoints', () => {
orderType: 'market',
quantity: '1',
force: 'normal',
})
}),
).toMatchObject({
...sucessEmptyResponseObject(),
data: expect.any(Array),
@@ -180,7 +180,7 @@ describe('Private Spot REST API POST Endpoints', () => {
quantity: '1',
force: 'normal',
},
])
]),
).toMatchObject({
...sucessEmptyResponseObject(),
data: {
@@ -251,7 +251,7 @@ describe('Private Spot REST API POST Endpoints', () => {
orderType: 'market',
triggerPrice: 100,
orderId: '123456',
})
}),
).toMatchObject({
...sucessEmptyResponseObject(),
data: expect.any(Array),
@@ -268,7 +268,7 @@ describe('Private Spot REST API POST Endpoints', () => {
expect(
await api.cancelPlanOrder({
orderId: planOrderId || '123456',
})
}),
).toMatchObject({
...sucessEmptyResponseObject(),
data: expect.any(String),