feat(): add plan order endpoints

This commit is contained in:
Tiago Siebler
2023-03-22 15:00:40 +00:00
parent bf2e545d09
commit 31aee2a0e5
6 changed files with 464 additions and 202 deletions

View File

@@ -159,4 +159,45 @@ describe('Private Spot REST API GET Endpoints', () => {
expect(e).toBeNull();
}
});
it('getCurrentPlanOrders()', async () => {
try {
expect(
await api.getCurrentPlanOrders({ symbol, pageSize: '20' })
).toMatchObject({
...sucessEmptyResponseObject(),
data: {
endId: null,
nextFlag: false,
orderList: expect.any(Array),
},
});
} catch (e) {
console.error('getCurrentPlanOrders: ', e);
expect(e).toBeNull();
}
});
it('getHistoricPlanOrders()', async () => {
try {
expect(
await api.getHistoricPlanOrders({
symbol,
pageSize: '20',
startTime: '1667889483000',
endTime: '1668134732000',
})
).toMatchObject({
...sucessEmptyResponseObject(),
data: {
endId: null,
nextFlag: false,
orderList: expect.any(Array),
},
});
} catch (e) {
console.error('getHistoricPlanOrders: ', e);
expect(e).toBeNull();
}
});
});