# ETPA Public API For access to the ETPA platform, please send an e-mail to support@etpa.nl Version: 1.0 ## Servers ``` https://acc-trading.etpa.nl ``` ## Security ### api-key Type: apiKey In: header Name: api_key ## Download OpenAPI description [ETPA Public API](https://api-reference.etpa.nl/_bundle/api.yaml) ## Congestion Management This API provides congestion data to support grid management and decision-making. It is used exclusively by GOPACS to access spread bucket information related to electricity grid congestion > NOTE: This endpoint can be **only** used by [GOPACS](https://www.gopacs.eu). ### Create congestion spread bucket - [POST /public-api/2.0/electricity/congestion-spread-bucket](https://api-reference.etpa.nl/api/congestion-management/createcongestionspreadbucket.md): Creates congestion spread bucket with specified orders ## Congestion State Check This API allows GOPACS to check the current status of congestion spread buckets. It helps determine whether congestion data is available or up to date. > NOTE: This endpoint can be **only** used by [GOPACS](https://www.gopacs.eu). ### Get congestion spread buckets status - [GET /public-api/2.0/electricity/congestion-spread-bucket/status](https://api-reference.etpa.nl/api/congestion-state-check/createcongestionspreadbucket_1.md): Get congestion spread buckets status ## GOPACS Orderbook Locking > NOTE: This API can **only** be used by [GOPACS](https://www.gopacs.eu/). ### Unlock orders in orderbook - [POST /public-api/1.0/electricity/gopacs-orderbook/status/unlock](https://api-reference.etpa.nl/api/gopacs-orderbook-locking/unlockorders.md): Unlocks orders with specified id's ### Unlocks entire orderbook - [POST /public-api/1.0/electricity/gopacs-orderbook/status/unlock/all](https://api-reference.etpa.nl/api/gopacs-orderbook-locking/unlockorderbook.md): Unlocks all orders from GOPACS orderbook ### Lock orders in orderbook - [POST /public-api/1.0/electricity/gopacs-orderbook/status/lock](https://api-reference.etpa.nl/api/gopacs-orderbook-locking/lockorders.md): Locks orders with specified id's ### Locks entire orderbook - [POST /public-api/1.0/electricity/gopacs-orderbook/status/lock/all](https://api-reference.etpa.nl/api/gopacs-orderbook-locking/lockorderbook.md): Locks all orders from GOPACS orderbook ### Get orderbook lock status - [GET /public-api/1.0/electricity/gopacs-orderbook/status](https://api-reference.etpa.nl/api/gopacs-orderbook-locking/getorderbookstate.md): Get current orderbook status ## GOPACS Orders v2 This endpoints will allow you to `create`, `update`, `delete` orders for GOPACS only. Everything created here can be retrieved by the GOPACS platform and can be used for solving congestion problems. ### Get GOPACS order by id - [GET /public-api/2.0/electricity/orders/gopacs/{id}](https://api-reference.etpa.nl/api/gopacs-orders-v2/getorder_1.md): Get order by id ### Update Order - [PUT /public-api/2.0/electricity/orders/gopacs/{id}](https://api-reference.etpa.nl/api/gopacs-orders-v2/updateorder.md): Updates existing GOPACS order by id. ### Delete GOPACS order. - [DELETE /public-api/2.0/electricity/orders/gopacs/{id}](https://api-reference.etpa.nl/api/gopacs-orders-v2/cancelorder_1.md): Delete order by id ### Get GOPACS orders - [GET /public-api/2.0/electricity/orders/gopacs](https://api-reference.etpa.nl/api/gopacs-orders-v2/getorders_1.md): Get a list of all orders ### Create Order - [POST /public-api/2.0/electricity/orders/gopacs](https://api-reference.etpa.nl/api/gopacs-orders-v2/createorder.md): Creates new GOPACS order. ## GOPACS Orders – Grid Operator v2 > NOTE: This API can only be used by [GOPACS](https://www.gopacs.eu/) ### Get GOPACS orderboook orders - [GET /public-api/2.0/electricity/grid-operator-order-book](https://api-reference.etpa.nl/api/gopacs-orders-grid-operator-v2/getorders_3.md): Get all active orders ## On Hold Orders The on hold orders API provides you the possibility to hold orders before they are going to be **traded**. You can hold your orders and once the orders are on hold they are **not** going to be traded with the orderbook. ### Get On Hold Orders - [GET /public-api/1.0/electricity/on-hold-orders](https://api-reference.etpa.nl/api/on-hold-orders/getonholdorders.md): Get a list of on hold orders. ### Create On Hold Orders - [POST /public-api/1.0/electricity/on-hold-orders](https://api-reference.etpa.nl/api/on-hold-orders/createonholdorders.md): Creates new on hold orders. To create on hold order, id or id's of the existing Orders must be provided ### Get On Hold Order - [GET /public-api/1.0/electricity/on-hold-orders/{id}](https://api-reference.etpa.nl/api/on-hold-orders/getonholdorder.md): Get order by ID. ### Delete On Hold Order - [DELETE /public-api/1.0/electricity/on-hold-orders/{id}](https://api-reference.etpa.nl/api/on-hold-orders/deleteorder.md): Delete on hold order by ID. ## Order Status The Order status API will give the current status or the history of the status of the order. The Order status API can only be accessed by users who have **trading rights**. It will give you orders from **GOPACS orderbook**, **local intraday** and **local intraday**. ### Get History of the Order Status - [GET /public-api/1.0/electricity/orders/status/{orderId}](https://api-reference.etpa.nl/api/order-status/getorderstatus_1.md): Get history of the order status by orderId ### Get Current Order Status - [GET /public-api/1.0/electricity/orders/status/{orderId}/current](https://api-reference.etpa.nl/api/order-status/getordercurrentstatus_1.md): Get current order status by orderId ### Get History of the Order Status by basket id - [GET /public-api/1.0/electricity/orders/status/basket/{basketId}](https://api-reference.etpa.nl/api/order-status/getbasketorderstatus_1.md): Get history of the order status by basketId that were created on POST/PUT order requests. ### Get Current Order Status by basket id - [GET /public-api/1.0/electricity/orders/status/basket/{basketId}/current](https://api-reference.etpa.nl/api/order-status/getbasketordercurrentstatus.md): Get current order status by basketId that were created on POST/PUT order requests. ## Orders v2 The following things are changed from version 1: - You will get an error code and an error message when the order is incorrect. - You will get an `orderId` back from the post request to check the status of your order. `"Intraday"` orders will be rejected from this endpoints when `"XBID"` functionality is **enabled**. `"Expost"` orders will still work. You can create `"Intraday"` orders for `"XBID"` using the **XBID Orders endpoints** ### Get Order - [GET /public-api/2.0/electricity/orders/{id}](https://api-reference.etpa.nl/api/orders-v2/getorder.md): Get order by id. ### Update Order - [PUT /public-api/2.0/electricity/orders/{id}](https://api-reference.etpa.nl/api/orders-v2/putorder.md): 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. ### Cancel Order - [DELETE /public-api/2.0/electricity/orders/{id}](https://api-reference.etpa.nl/api/orders-v2/cancelorder.md): Cancel order by ID. ### Get Orders - [GET /public-api/2.0/electricity/orders](https://api-reference.etpa.nl/api/orders-v2/getorders.md): Get orders filtered on the selected timeblock(s), on participantId, on own orders or not with the my-parameter. ### Create Order - [POST /public-api/2.0/electricity/orders](https://api-reference.etpa.nl/api/orders-v2/postorder.md): Creates new order. When creating a new order, there are 2 options - Creating a buy order - Creating a sell order ## Trades v2 > NOTE: The trade API can only be used by users who have trading rights ### Get Recent Trades of Participant - [GET /public-api/2.0/electricity/trades/recent](https://api-reference.etpa.nl/api/trades-v2/getrecenttrades_1.md): The recent trades will only return your trades back from the last 2 days. The participantId is only useful for brokers. The pagination works slightly different than the other endpoints. It will return the first 1000 results and after that you can add the pageNumber as a parameter to get the remaining results. ### Get Trades (deprecated) - [GET /public-api/2.0/electricity/trades](https://api-reference.etpa.nl/api/trades-v2/gettrades_1.md): > NOTE: This endpoint is not supported anymore. Please have a look at Trades v3 Get trades filtered on own orders or not with the my-parameter and date based on `start and end. In the Trade endpoint, we have introduced pagination. The reason is that when you apply no filters your request won’t be time-out and you won’t be overloaded with data. When you don’t provide any parameters, the application will return with the last 100 trades and give you the option to get the next 100 trades. To do this you use the cursor parameter with nextCursor` value that has been given to you from the response. It makes use of pagination V1.0 ### Get Trade (deprecated) - [GET /public-api/2.0/electricity/trades/{tradeId}](https://api-reference.etpa.nl/api/trades-v2/gettrade_1.md): > NOTE: This endpoint is not supported anymore. Please have a look at Trades v3 Get trade by tradeId. ## Trades v3 This API provides endpoints to retrieve trade information. It supports fetching **all trades** with pagination and sorting by latest first, as well as retrieving a **specific trade** by its `tradeId`. All endpoints are secured with an **API key**. ### Get Trades - [GET /public-api/3.0/electricity/trades](https://api-reference.etpa.nl/api/trades-v3/gettrades.md): The endpoint makes use of the pagination 2.0. It will allow you to retrieve the trades sorted by latest first ### Get Trade - [GET /public-api/3.0/electricity/trades/{tradeId}](https://api-reference.etpa.nl/api/trades-v3/gettrade.md): This request allows you to retrieve a specific trade by tradeId ## Platform Status The platform Status API will give you information about the status of the ETPA Platform ### Get Public Announcements - [GET /public-api/1.0/platform-status/announcement](https://api-reference.etpa.nl/api/platform-status/get.md): This endpoint will give you all the announcements of the application ### Get Public Announcement by id - [GET /public-api/1.0/platform-status/announcement/{id}](https://api-reference.etpa.nl/api/platform-status/getpublicannouncementbyid.md): Get public announcement by annoucement id ### Get Active Public Announcements - [GET /public-api/1.0/platform-status/announcement/getActiveAnnouncements](https://api-reference.etpa.nl/api/platform-status/getactiveannouncements.md): Get all active public announcements ## User Management The user API which will give you all the information about an individual and all the information about the participants. The User API can be accessed by **Trade**, **Report** and **Wallet** users. ### Get My Participants - [GET /public-api/1.0/electricity/users/participants](https://api-reference.etpa.nl/api/user-management/getmyparticipants.md): This request will give you the information of the participants that are representing you. ### Get Individual - [GET /public-api/1.0/electricity/users/individual](https://api-reference.etpa.nl/api/user-management/getmyindividual.md): This request will give you the information about you as an individual. ## Reporting v2 The reporting API is used for reporting purposes. It can be used by users who have **trade**, **wallet** or **reporting** access. ### Get orders and trades report - [GET /public-api/2.0/electricity/reporting/orders-trades](https://api-reference.etpa.nl/api/reporting-v2/ordersandtrades.md) ### Get single order and trade - [GET /public-api/2.0/electricity/reporting/orders-trades/{tradeId}](https://api-reference.etpa.nl/api/reporting-v2/getoneordersandtrade.md) ## Reporting v3 This enable pv-parties to get the trade information of their connected pv-party clients, no order information is given to the pv-party. The connection of participants to a PV party is done by the ETPA admin in our system. ### PV party participant report - [GET /public-api/3.0/electricity/reporting/pv-party-participant](https://api-reference.etpa.nl/api/reporting-v3/pvpartyparticipant.md) ## Wallet v2 The Wallet V2 provides wallet data about a participant and it will give you the transactions. The Wallet can be used by participant who has **reporting**, **trade** or **wallet** access. ### Get Transactions - [GET /public-api/2.0/electricity/wallets/transactions](https://api-reference.etpa.nl/api/wallet-v2/getwallettransactions.md): Get wallet transactions by participant ID between start (exclusive) and end (exclusive) dates. The number of transactions returned can be limited using the count with max 100. Cursor is used for paging on id. ### Get Balance - [GET /public-api/2.0/electricity/wallets/balance](https://api-reference.etpa.nl/api/wallet-v2/getwalletbalance_1.md): Get wallet balance by default participant. ## Wallet v3 The **XBID Wallet Balance Controller** provides an endpoint to retrieve the balances of a trader’s wallet and XBID wallet for a given `participantId`. Access requires an API key, and the response returns the current wallet balances. ### Get Balance - [GET /public-api/3.0/electricity/wallets/balance](https://api-reference.etpa.nl/api/wallet-v3/getwalletbalance.md): This endpoint will give you the balance of your trader wallet and XBID wallet participantId. ## XBID Contracts v1 The **XBID Contracts v1** provides an endpoint to retrieve all active XBID contracts. While the `contractId` cannot be used to create orders, the endpoint offers information about when contracts will be available for trading and requires an API key for access. ### Get Contracts - [GET /public-api/1.0/xbid/active-contracts](https://api-reference.etpa.nl/api/xbid-contracts-v1/getallactivecontracts.md): This XBID contract endpoint will return all the active contracts for XBID. Even though you can’t create orders with the contractId it will give you an indication when the contracts will be opened for trading. ## XBID Orders v1 The XBID Orders v1 will be used for managing orders for XBID. This API will also function in case of a disconnection of XBID. > **Be aware:** In case the XBID connection gets lost. The new orders which are created with the XBID order API will be automatically forwarded to the local intraday orderbook. You can use the XBID Status API for the current connection of XBID. ### Get Order - [GET /public-api/1.0/xbid/electricity/orders/{id}](https://api-reference.etpa.nl/api/xbid-orders-v1/getorder_2.md): This API will get you a specific order from the Orderbook. You must use the ETPA order id and not the XBID order id. ### Update Order - [PUT /public-api/1.0/xbid/electricity/orders/{id}](https://api-reference.etpa.nl/api/xbid-orders-v1/putorder_1.md): 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 it's own clients. ### Cancel Order - [DELETE /public-api/1.0/xbid/electricity/orders/{id}](https://api-reference.etpa.nl/api/xbid-orders-v1/cancelorder_2.md): Cancel order by ETPA ID. ### Get Orders - [GET /public-api/1.0/xbid/electricity/orders](https://api-reference.etpa.nl/api/xbid-orders-v1/getorders_2.md): With the GET request you can retrieve all the orders which are currently in the orderbook. This will display both your own orders, but also the orders from other exchanges. Orders can be filtered on the selected delivery start time, on delivery end time, on participantId, on own orders or not with the my-parameter. ### Create Order - [POST /public-api/1.0/xbid/electricity/orders](https://api-reference.etpa.nl/api/xbid-orders-v1/postorder_1.md): Creates new order. When creating a new order, there are 2 options: - Creating a buy order - Creating a sell order ### Cancel all orders - [DELETE /public-api/1.0/xbid/electricity/orders](https://api-reference.etpa.nl/api/xbid-orders-v1/deleteallorders.md): Cancel all user orders ### Create Basket Order - [POST /public-api/1.0/xbid/electricity/orders/basket](https://api-reference.etpa.nl/api/xbid-orders-v1/handlebasketorderrequest.md): Creates new basket order. When creating a new basket order, you must select the Execution Type - "NONE": All orders in the order list are executed individually. - "VALID": All orders must be valid orders. If 1 order is invalid, none of the orders are executed. - "LINKED": All orders in the order list must be matched immediately. If 1 order does not match immediately, all orders in the order list are canceled. ### Get Orders By Quarters - [GET /public-api/1.0/xbid/electricity/orders/quarter](https://api-reference.etpa.nl/api/xbid-orders-v1/getquartersorderslist.md): Get orders filtered on quarters interval. Please provide Date in this format yyyy-mm-dd ### Get Orders By Hours - [GET /public-api/1.0/xbid/electricity/orders/hour](https://api-reference.etpa.nl/api/xbid-orders-v1/gethoursorderslist.md): Get orders filtered on hourly interval. Please provide Date in this format yyyy-mm-dd ### Get Orders By Half Hours - [GET /public-api/1.0/xbid/electricity/orders/half-hour](https://api-reference.etpa.nl/api/xbid-orders-v1/gethalfhoursorderslist.md): Get orders filtered on half hours interval. Please provide Date in this format yyyy-mm-dd ## XBID Order Status v1 The **XBID Order Status Controller** provides endpoints to retrieve both the **history** and **current status** of XBID orders and baskets. It supports filtering by `orderId` or `basketId` and requires an API key for authentication. Responses include detailed order status entries or lists, with proper handling of cases where no matching records are found. ### Get History of the XBID Order Status by orderId - [GET /public-api/1.0/xbid/orders/status/{id}](https://api-reference.etpa.nl/api/xbid-order-status-v1/getorderstatus.md): Get history of the order status with filtering by orderId that creating on POST/PUT order requests. ### Get Current Order Status by orderId - [GET /public-api/1.0/xbid/orders/status/{id}/current](https://api-reference.etpa.nl/api/xbid-order-status-v1/getordercurrentstatus.md): Get current XBID order status with filtering by orderId that creating on POST/PUT order requests. ### Get History of the XBID Basket Orders Status by basket id - [GET /public-api/1.0/xbid/orders/status/basket/{id}](https://api-reference.etpa.nl/api/xbid-order-status-v1/getbasketorderstatus.md): Get history of the order status with filtering by basketId that creating on POST/PUT order requests. ### Get Current Order Status by basket id - [GET /public-api/1.0/xbid/orders/status/basket/{id}/current](https://api-reference.etpa.nl/api/xbid-order-status-v1/getbasketorderscurrentstatus.md): Get current XBID order status with filtering by basket id that creating on post/put order requests. ## XBID Reporting v1 The **XBID Order API** is used for creating orders for XBID. It also remains functional in the event of a **disconnection** from XBID. > ⚠️ **Important:** > If the XBID connection is lost, any new orders created via the **XBID Order API** will be **automatically forwarded** to the local intraday orderbook. For monitoring the current connection status of XBID, you can use the **XBID Status v1 API**. ### Get orders and trades report - [GET /public-api/1.0/xbid/reporting/orders-trades](https://api-reference.etpa.nl/api/xbid-reporting-v1/fetchordersandtrades.md) ### Get order report report by trade id - [GET /public-api/1.0/xbid/reporting/orders-trades/by-trade/{tradeId}](https://api-reference.etpa.nl/api/xbid-reporting-v1/gettrade_3.md) ### Get order reports by order id - [GET /public-api/1.0/xbid/reporting/orders-trades/by-order/{orderId}](https://api-reference.etpa.nl/api/xbid-reporting-v1/getorders_4.md) ## XBID Status v1 The **XBID Status API** provides the current status of the XBID connection. - Returns whether XBID is **connected** (`true`) or **disconnected** (`false`) in **boolean** format. ### Get XBID Status - [GET /public-api/1.0/xbid/status](https://api-reference.etpa.nl/api/xbid-status-v1/getstatus.md): Get status of XBID ## XBID Trades v1 This request will give you all your XBID trades from the last 48 hours. ### Get Recent XBID Trades of Participant - [GET /public-api/1.0/xbid/trades/recent](https://api-reference.etpa.nl/api/xbid-trades-v1/getrecenttrades_2.md): The recent XBID trades API will return all the trades of the last 48 hrs. If participantId param is empty, endpoint will return trades owned by currently logged user only. ## XBID Trade Reports v1 The **XBID Trades API** allows you to retrieve all trades in XBID. - You can apply various **filters** to narrow down the results. ### Get Trades - [GET /public-api/1.0/xbid/trades/report](https://api-reference.etpa.nl/api/xbid-trade-reports-v1/gettrades_2.md) ### Get Trade - [GET /public-api/1.0/xbid/trades/report/{id}](https://api-reference.etpa.nl/api/xbid-trade-reports-v1/gettrade_2.md): Get Trade by id. ### Get trade by order id - [GET /public-api/1.0/xbid/trades/report/order/{orderId}](https://api-reference.etpa.nl/api/xbid-trade-reports-v1/gettradebyorderid.md): Get trade by order id. ## XBID Wallet v1 With **XBID**, wallets are **separated**. Before trading on XBID, you must transfer funds from your **Trader Wallet** to your **XBID Wallet**. - Transfers can be performed via the **UI** or the **API**. - This API provides: - Information about **all transactions** that have occurred. - The ability to **transfer funds** between the Trader Wallet and the XBID Wallet. ### Withdraw money from your XBID Wallet - [POST /public-api/1.0/xbid/wallets/withdraw/{amount}](https://api-reference.etpa.nl/api/xbid-wallet-v1/withdraw.md): Withdraw money from your XBID Wallet into your Trader Wallet. ### Deposit money to your XBID Wallet - [POST /public-api/1.0/xbid/wallets/deposit/{amount}](https://api-reference.etpa.nl/api/xbid-wallet-v1/deposit.md): Deposit money to your XBID Wallet from your Trader Wallet. ### Get Transactions - [GET /public-api/1.0/xbid/wallets/transactions](https://api-reference.etpa.nl/api/xbid-wallet-v1/getwallettransactions_1.md): Get wallet transactions by participant ID between start (exclusive) and end (exclusive) dates. ## XBID Public Trade API v2 ### Get all public XBID trades - [GET /public-api/2.0/xbid/public-trades/{deliveryAreaId}](https://api-reference.etpa.nl/api/xbid-public-trade-api-v2/getrecenttrades.md): Get all public XBID trades which can be filtered and paged ## XBID Public Trade API v1 ### Get all public XBID trades - [GET /public-api/1.0/xbid/public-trades](https://api-reference.etpa.nl/api/xbid-public-trade-api-v1/getallxbidtrades.md): Get all public XBID trades which can be filtered and paged ### Get Recent Public XBID Trades - [GET /public-api/1.0/xbid/public-trades/recent](https://api-reference.etpa.nl/api/xbid-public-trade-api-v1/getrecenttrades_3.md): The recent Public XBID trades API will return all the trades of the last 2 days.