Skip to content

Update Order

Request

Updates existing order.

When creating a new order, a regular user has 2 options:

  • Creating a buy order
  • Creating a sell order

Brokers have the ability to create a direct trade. This enables the broker to do trades between his own clients.

Security
api-key
Path
idstringrequired
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 paramater named 'id' containing the order Id. Due to the order being created asynchronously, the status cannot be returned by the current http request. After receival of the Id the order can be traced using the Server Sent Events.

Bodyapplication/jsonrequired
orderTypestringrequired

The Order type is required field.

Example:"BUY / SELL"
participantIdstring
Example:"292c3db8-3ee1-4999-bbed-d579225d1596"
quantitynumberrequired

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

Example:2
startinteger, (int64)required

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

Example:1465596000000
endinteger, (int64)required

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

Example:1465682400000
timeblockstringrequired

The Timeblock is required field.

Example:"INTRADAY / EXPOST / GOPACS"
pricenumberrequired

The Price is required field.

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

Custom expiration time of an order. If no value is provided then the order will expire 15 minutes before the start time.The time must be a time in the future and must not be later than 15 minutes before the start time. The time provided must be a multiple of 15 minutes. For example 03:00, 03:15, 03:30 and 03:45.This field is not valid for EXPOST orders and an error will be thrown if provided for that order type.

Example:1465682400000
allowedToBeUsedForIdconsboolean
PUT
/public-api/2.0/electricity/orders/{id}
curl -i -X PUT \
  'https://acc-trading.etpa.nl/public-api/2.0/electricity/orders/{id}?callbackurl=string' \
  -H 'Content-Type: application/json' \
  -H 'api_key: YOUR_API_KEY_HERE' \
  -d '{
    "orderType": "BUY / SELL",
    "participantId": "292c3db8-3ee1-4999-bbed-d579225d1596",
    "quantity": 2,
    "start": 1465596000000,
    "end": 1465682400000,
    "timeblock": "INTRADAY / EXPOST / GOPACS",
    "price": 35,
    "ean": 871685920001768800,
    "metadata": {
      "key1": "value1",
      "key2": "value2"
    },
    "customExpirationTime": 1465682400000,
    "allowedToBeUsedForIdcons": true
  }'

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 }