I believe the post method for Open Position has changed.
This is what works for me now in C# (example code):
var data = new
{
productId = "sb26497",
investingAmount = new { currency = "BUX, decimals = 2, amount = 100},
leverage = 20,
direction = "BUY",
};
var result = await client.PostAsync(url, data.AsJson()).ConfigureAwait(false);
You can probably translate it to node.js
I believe the post method for Open Position has changed.
This is what works for me now in C# (example code):
var data = new
{
productId = "sb26497",
investingAmount = new { currency = "BUX, decimals = 2, amount = 100},
leverage = 20,
direction = "BUY",
};
var result = await client.PostAsync(url, data.AsJson()).ConfigureAwait(false);
You can probably translate it to node.js