NormalizeVolume in connect API
Created at 27 Jul 2017, 13:15
NormalizeVolume in connect API
27 Jul 2017, 13:15
Hey Guys :)
Is there a function that normalize the volume like the one in the cAlgo API(NormalizeVolume(double, RoundingMode))?
If not, how can i create one? what is it a normal amount in each size?
Thanks!!!
Spotware
27 Jul 2017, 14:39
Hi obaum1,
Connect API does not offer this function. However, normalization requires a simple function like the following
The Symbol's step is provided by the Accounts API. You can get it using the following request
https://sandbox-api.spotware.com/connect/tradingaccounts/89214/symbols?oauth_token=test002_access_token
Based on your needs you can replace (int) with Math.Floor() or Math.Ceiling(). You can also add conditions for minimum and maximum quantity.
Best Regards,
cTrader Team
@Spotware