Authentication
Obtaining an API Key
To begin using the Hook Odyssey API, you'll need to obtain an API key. Follow these steps to get started:
Join the Hook Discord
Submit a Ticket: Be sure to include the ethereum address to link the API key to, and some details about your usage. Are you a market maker or systematic trader, application developer, etc.?
You should recieve an initial response within 24 hours. Please send a follow up in the created support channel if you do not recieve a response.
Authenticating Requests
Authentication is required for all queries, mutations, and subscription.
GraphQL Queries and Mutations:
Your API key should be included in the HTTP Request headers with the header key: X-HOOK-API-KEY
.
Here's an example query in Python using the gql library:
With returns:
Make sure to replace "your_api_key_here"
with the actual API key provided to you.
GraphQL Subscriptions:
When authenticating via websockets for a GraphQL subscription, you need to include the X-HOOK-API-KEY
in your connection_init
message's payload. Here's an example:
Here's an example subscription in Python using the gql library:
Again, ensure that "your_api_key_here"
is replaced with the actual API key provided to you.
Last updated