All orders deleted by market (DEL_PUSH)

Added by Mark 10 months ago

Hi
I'm using the swagger docs to try out the API.
I can create an order (POST POST /next/2/accounts/{accno}/orders) which seems to work fine (see response example below).
However all my orders is automatically and instantly deleted by the market (they all have status deleted). I've tested with to different tradeables (11:100 ERIC B and 14:1158 Novo), same result.
Can anyone tell me why that is?

Example response from POST /orders:

Response Body
{
  "order_id": 1343370,
  "result_code": "OK",
  "order_state": "LOCAL",
  "action_state": "INS_PEND" 
}
Response Code
200
Response Headers
{
  "Date": "Mon, 30 Sep 2019 12:09:48 GMT",
  "Server": "Nordnet External API",
  "Strict-Transport-Security": "max-age=31536000",
  "P3p": "CP=\"This is not a P3P policy\"",
  "Access-Control-Allow-Origin": "https://api.test.nordnet.se",
  "Access-Control-Allow-Credentials": "true",
  "Connection": "Keep-Alive",
  "Content-Type": "application/json; charset=UTF-8",
  "Keep-Alive": "timeout=2, max=100",
  "Content-Length": "87" 
}

Example response from GET /orders called directly after order is created:

Response Body
[
  {
    "volume": 0,
    "price": {
      "currency": "DKK",
      "value": 350
    },
    "accno": 9213450,
    "traded_volume": 10,
    "side": "BUY",
    "order_id": 1343369,
    "modified": 1569844802165,
    "order_type": "LIMIT",
    "tradable": {
      "identifier": "1158",
      "market_id": 14
    },
    "validity": {
      "type": "DAY",
      "valid_until": 1569855900000
    },
    "price_condition": "LIMIT",
    "volume_condition": "NORMAL",
    "activation_condition": {
      "type": "NONE" 
    },
    "order_state": "DELETED",
    "action_state": "DEL_PUSH" 
  },
  {
    "volume": 0,
    "price": {
      "currency": "DKK",
      "value": 95
    },
    "accno": 9213450,
    "traded_volume": 10,
    "side": "BUY",
    "order_id": 1343370,
    "modified": 1569845389349,
    "order_type": "LIMIT",
    "tradable": {
      "identifier": "100",
      "market_id": 11
    },
    "validity": {
      "type": "DAY",
      "valid_until": 1569857700000
    },
    "price_condition": "LIMIT",
    "volume_condition": "NORMAL",
    "activation_condition": {
      "type": "NONE" 
    },
    "order_state": "DELETED",
    "action_state": "DEL_PUSH" 
  }
]
Response Code
200
Response Headers
{
  "Date": "Mon, 30 Sep 2019 12:10:22 GMT",
  "Content-Encoding": "gzip",
  "Server": "Nordnet External API",
  "Strict-Transport-Security": "max-age=31536000",
  "Content-Type": "application/json; charset=UTF-8",
  "Connection": "Keep-Alive",
  "Keep-Alive": "timeout=2, max=100",
  "Content-Length": "310" 
}

Thank you.


Replies (1)

RE: All orders deleted by market (DEL_PUSH) - Added by Mark 9 months ago

Haha - okay, this is great (I'll write this for anyone else having the same questions).

There is no issue, the orders actually did go through and filled. They are visible through: GET /account/<acc_no>/positions

I guess this just wasn't clear due to me using just the swagger API and not having a feed to monitor events. So the only thing I am seeing is the "end state" being 'DEL_PUSH' / 'Deleted'... I guess I expected the end state of a fulfilled order to be INS_CONF + some kind of affirmative order_state.

"Solved - error 40"

(1-1/1)