Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not place multiple orders with JSON object param. #11

Closed
vuongnq10 opened this issue Aug 19, 2024 · 1 comment
Closed

Can not place multiple orders with JSON object param. #11

vuongnq10 opened this issue Aug 19, 2024 · 1 comment

Comments

@vuongnq10
Copy link

Issue subject

Source code comes from here
https://github.com/binance/binance-futures-connector-node/blob/main/examples/um_futures/account/placeMultipleOrders.js

const batchOrders = [
  { symbol: 'BNBUSDT', ...others},
  { symbol: 'BNBUSDT', ...others }
]
umFuturesClient
  .placeMultipleOrders(batchOrders)
  .then((response) => console.log(response))
  .catch(console.error)

Expected behaviour

I believe that the request params should be transformed to string before sending

const batchOrders = [
  { symbol: 'BNBUSDT', ...others},
  { symbol: 'BNBUSDT', ...others }
]
umFuturesClient
  .placeMultipleOrders(JSON.stringify(batchOrders))
  .then((response) => console.log(response))
  .catch(console.error)

I'm running my trading bot with this config and it works well

Actual behaviour

N/A

Steps to reproduce

N/A

Environment

N/A

@alplabin
Copy link
Contributor

alplabin commented Dec 4, 2024

Thanks for pointing out this issue. It has been updated in v0.1.6

@alplabin alplabin closed this as completed Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants