Quote and Base currencies missing in API (cAlgo)

Created at 21 Jul 2022, 21:15
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
MA

marktbs

Joined 18.07.2022

Quote and Base currencies missing in API (cAlgo)
21 Jul 2022, 21:15


cAlgo API is missing quote and base instruments information, like Name for example.

For example to get the quote currency (for volume conversion), we need to do funny methods that split Symbol.Name into 2 parts etc.. this is not professional nor universal and does not work with all instruments.

For indexes (US30, F40..) - there is no way at all to get the quote currency, so the only way is to hard-code it.

 

p.s. Additionally would be great to have methods that help with volume conversion from account asset - into quoted asset, or to base units even better.


cTrader Automate
@marktbs
Replies

heinrich.munz
14 Feb 2023, 19:26

RE: Quote and Base currencies missing in API

marktbs said:

cAlgo API is missing quote and base instruments information, like Name for example.

For example to get the quote currency (for volume conversion), we need to do funny methods that split Symbol.Name into 2 parts etc.. this is not professional nor universal and does not work with all instruments.

For indexes (US30, F40..) - there is no way at all to get the quote currency, so the only way is to hard-code it.

 

p.s. Additionally would be great to have methods that help with volume conversion from account asset - into quoted asset, or to base units even better.

In the meantime, Spotware have added Base and Quote Information to SymbolInfo. In Asset there is the name and Digits


      //
      // Summary:
      //     Gets the symbol base asset.
      Asset BaseAsset { get; }

      //
      // Summary:
      //     Gets the symbol quote asset.
      Asset QuoteAsset { get; }
 


@heinrich.munz