Skip to content

Create Order

Request

Creates new order. When creating a new order, there are 2 options:

  • Creating a buy order
  • Creating a sell order
Security
api-key
Query
callbackurlstring

Callback to return the Id of the order to after initial processing by our system. The callback url will receive a GET request with a parameter named 'id' containing the order Id. Due to the order being created asynchronously, the status cannot be returned by the current http request. After receive of the Id the order can be traced using the Server Sent Event.

Bodyapplication/jsonrequired
orderTypestringrequired

The Order type is required field.

Enum:"BUY""SELL"
Example:"BUY / SELL"
xbidOrderTypestringrequired

The XBID Order type is required field. Currently supported types include REGULAR and ICEBERG

Example:"REGULAR / ICEBERG"
participantIdstringrequired
Example:"292c3db8-3ee1-4999-bbed-d579225d1596"
capacitynumberrequired

The capacity can not be negative and 0. Also the decimal limit of the capacity is 1. The capacity is required field.

Example:2
deliveryStartTimeinteger, (int64)required

The start time is an epoch time. It is the time in milliseconds since the start of the unix time. The deliveryStartTime time is required field.

Example:1465596000000
deliveryEndTimeinteger, (int64)required

The end time is an epoch time. It is the time in milliseconds since the start of the unix time. The deliveryEndTime time is required field

Example:1465682400000
unitPricenumber, [ -9999 .. 9999 ]required

The UnitPrice is required field.

Example:35
metadataobject
Example:
{ "key1": "value1", "key2": "value2" }
customExpirationTimeinteger, (int64)

Custom expiration time of an order. If no value is provided then the order will expire at start time.The time must be a time in the future and must not be later than the start time. The time provided must be a multiple of 5 minutes. For example 03:00, 03:05, 03:10 and 03:15.

Example:1465682400000
orderDeliveryAreastringrequired

Delivery Area Id where the order is located.

Enum:"AT""BG""BE""CZ""DE1""DE2""DE3""DE4""DK1""DK2"
Example:"NL / NL - TTN / 10YNL----------L"
orderStatusstring

The Order status is required field.

Enum:"ACTIVE""HIBERNATE""WITHDRAWN"
Example:"ACTIVE / HIBERNATE"
orderExecutionstringrequired

Order execution restriction. Currently only supported types are NON, FOK and IOC

Enum:"NON""FOK""IOC"
Example:"NON / FOK / IOC "
allowedForLocalMarketboolean

When this field is true the order is allowed to go to the local market. If this field is false the order will be rejected and will not be sent to the local market if XBID is down.

Example:false
orderVersionobject(OrderVersion)

Order validity check

showCapacitynumber

The quantity shown to the market. Only used for XbidOrderType ICEBERG

Example:2
pricePerDeltanumber

The peak price delta means that the price of the order can be increased/ decreased with every slice. This field is optional, meaning the default value is 0.0.

Example:2
POST
/public-api/1.0/xbid/electricity/orders
curl -i -X POST \
  'https://acc-trading.etpa.nl/public-api/1.0/xbid/electricity/orders?callbackurl=string' \
  -H 'Content-Type: application/json' \
  -H 'api_key: YOUR_API_KEY_HERE' \
  -d '{
    "orderType": "BUY / SELL",
    "xbidOrderType": "REGULAR / ICEBERG",
    "participantId": "292c3db8-3ee1-4999-bbed-d579225d1596",
    "capacity": 2,
    "deliveryStartTime": 1465596000000,
    "deliveryEndTime": 1465682400000,
    "unitPrice": 35,
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    },
    "customExpirationTime": 1465682400000,
    "orderDeliveryArea": "NL / NL - TTN / 10YNL----------L",
    "orderStatus": "ACTIVE / HIBERNATE",
    "orderExecution": "NON / FOK / IOC ",
    "allowedForLocalMarket": false,
    "orderVersion": {
      "revisionNo": 0,
      "xbidOrderId": 0
    },
    "showCapacity": 2,
    "pricePerDelta": 2
  }'

Responses

OK

Bodyapplication/json
hrefstring
hreflangstring
titlestring
typestring
deprecationstring
profilestring
namestring
templatedboolean
Response
{ "href": "string", "hreflang": "string", "title": "string", "type": "string", "deprecation": "string", "profile": "string", "name": "string", "templated": true }