Authentication and Login
Learn how to connect to TradeZero's APIs and establish secure communication with our trading platform.
Getting Your Credentials
TradeZero uses standard API Key technology to authenticate API requests to our platform. In order to obtain a TradeZero API key and secret you need to do the following:
- Have a TradeZero Account
- Using the TradeZero Portal you must activate API training for your account.
- Once your account is setup for API trading you can generate your API key and secret in the Portal.
- Copy your API key and secret to a secure location as you will need them to authenticate your API requests.
This ensures secure access to your trading account and data.
Keep your API credentials confidential. Do not share them or expose them in client-side code. If you lose your API secret, you will need to generate a new one from the TradeZero Portal.
Calling REST Endpoints
All TradeZero API requests are made over HTTPS to ensure data security. You can use any HTTP client library in your preferred programming language to make requests.
The API key and secret must be included in the request headers for authentication on every API call.
curl 'https://webapi.tradezero.com/v1/api/account/:accountId' \
-H 'Accept: application/json' \
-H 'TZ-API-KEY-ID: {YOUR_CLIENT_ID}' \
-H 'TZ-API-SECRET-KEY: {YOUR_CLIENT_SECRET}'