Skip to content

Commit

Permalink
fix(): submit order example
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosiebler committed Jan 25, 2025
1 parent 886e533 commit 5833d06
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions examples/apidoc/V5/Trade/place-order.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,31 @@ const client = new RestClientV5({
secret: 'apisecret',
});

// Submit a market order
client
.submitOrder({
category: 'spot',
symbol: 'BTCUSDT',
side: 'Buy',
orderType: 'Market',
qty: '0.1',
price: '15600',
timeInForce: 'PostOnly',
orderLinkId: 'spot-test-postonly',
isLeverage: 0,
orderFilter: 'Order',
qty: '1',
})
.then((response) => {
console.log(response);
})
.catch((error) => {
console.error(error);
});

// Submit a limit order
client
.submitOrder({
category: 'spot',
symbol: 'BTCUSDT',
side: 'Buy',
orderType: 'Limit',
qty: '1',
price: '55000',
})
.then((response) => {
console.log(response);
Expand Down

0 comments on commit 5833d06

Please sign in to comment.