This endpoint will return the order book of a contract, given the contract ID.


Using the LCPDelta Python Package

Synchronous

from lcp_delta import enact

enact_api_helper = enact.APIHelper(username, public_api_key)

response_dictionary = enact_api_helper.get_epex_order_book_by_contract_id(
	13134599 # the ID of a recent contract
)

print(response_dictionary)

Asynchronous (package version 1.3.0 and later)

from lcp_delta import enact
import asyncio

async def main():
    enact_api_helper = enact.APIHelper(username, public_api_key)

    response_dictionary = enact_api_helper.get_epex_order_book_by_contract_id(
        13134599 # the ID of a recent contract
    )

    print(response_dictionary)

asyncio.run(main())

Using the API Directly

We only store data from EPEX for today and yesterday. Use the Contracts by Day endpoint to retrieve a recent contract ID to use in the request object below.

Language
Authorization
OAuth2
Click Try It! to start a request and see the response here!