fxcm / ForexConnectAPI

Designed to trade, retrieve live/history price. Intended to be used to build auto-trading robots, custom trading on FXCM accounts.
132 stars 47 forks source link

Failed to create request: Instrument is not available for trading. #22

Closed jjqqkk closed 11 months ago

jjqqkk commented 11 months ago

Hi,

I finally fixed #20 and now trading on the new account.

However, when creating Market orders for GBP/USD and USD/CHF, the API returns "Failed to create request: Instrument is not available for trading.". USD/EUR and USD/JPY are working well.

Where can I enable GBP/USD and USD/CHF?

Thanks!

FXCMAPI commented 11 months ago

you can try enable them on our trading station platform

moleskn commented 7 months ago

Hi I am having same error, how can we enable them?

fxcm-dhalpert commented 7 months ago

To place order or to call get_offer() the instrument should be subscribed/visible, it can be done from API with SET_SUBSCRIPTION_STATUS command, please see example code in SetSubscriptionStatus.py. https://github.com/gehtsoft/forex-connect/tree/master/samples/Python https://fxcodebase.com/bin/forexconnect/1.6.5/help/Python/web-content.html#index.html

moleskn commented 7 months ago

To place order or to call get_offer() the instrument should be subscribed/visible, it can be done from API with SET_SUBSCRIPTION_STATUS command, please see example code in SetSubscriptionStatus.py. https://github.com/gehtsoft/forex-connect/tree/master/samples/Python https://fxcodebase.com/bin/forexconnect/1.6.5/help/Python/web-content.html#index.html

Thanks got it working.

For anyone else having this problem in C++ just use the example in SubscriptionStatus.

Not sure why some are enabled and some are disabled by default?