fix(): submit order example

This commit is contained in:
tiagosiebler
2025-01-25 01:10:30 +00:00
parent 886e533d5d
commit 5833d0679b

View File

@@ -6,18 +6,31 @@ const client = new RestClientV5({
secret: 'apisecret', secret: 'apisecret',
}); });
// Submit a market order
client client
.submitOrder({ .submitOrder({
category: 'spot', category: 'spot',
symbol: 'BTCUSDT', symbol: 'BTCUSDT',
side: 'Buy', side: 'Buy',
orderType: 'Market', orderType: 'Market',
qty: '0.1', qty: '1',
price: '15600', })
timeInForce: 'PostOnly', .then((response) => {
orderLinkId: 'spot-test-postonly', console.log(response);
isLeverage: 0, })
orderFilter: 'Order', .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) => { .then((response) => {
console.log(response); console.log(response);