Jump to content

GepotTrader

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by GepotTrader

  1. For future users: Despite indicating the correct account in the header, you actually need to switch to the account first using the session endpoint (PUT) before you will be able to interact with the account Instead of trying to decipher what you need to add to your payload to place orders, rather use the API companion to figure it out. In my case, the payload was incorrectly configured.
  2. Hi there, I tried contacting the email address for help but haven't received a response in two weeks. I am building a very simple trading app and can successfully get prices for different epics, however, I have several problems: I cannot seem to get a list of open positions. The result is successful (200) but empty. I made sure that I specified the correct account and I manually create positions so that there must be data available. I have the same problem with working orders. I manually created orders in my demo account, but the result from the API is empty. When trying to create a working order, I get an error message that is not described in the documentation. Here is an example payload: { "currencyCode": "USD", "direction": "SELL", "epic": "CS.D.GBPUSD.MINI.IP", "expiry": "DFB", "forceOpen": true, "goodTillDate": "2023/03/03 17:00:00", "guaranteedStop": false, "level": 1.1946, "limitDistance": 1, "size": 1, "timeInForce": "GOOD_TILL_DATE", "type": "STOP" } And here is the error: { "errorCode": "error.service.instrumentdata-invalid" } Any help would be greatly appreciated.
×
×
  • Create New...
us