The tZERO API provides programmatic access to the tZERO trading platform. Use it to manage orders, stream market data, access account and position information, and integrate directly with tZERO's ATS via REST or FIX 4.2 / 4.4 protocols.
Every request requires two credentials sent as headers:
x-apikey— Contact us to get your API keyAuthorization— Bearer token obtained from POST /auth/v1/api/token.Click Authorize in the API explorer to store both credentials in the browser; they will be sent automatically on every Try it out request.
https://gateway-web-api.tzero.com/app1curl -X POST https://gateway-web-api.tzero.com/app/auth/v1/api/token2 -H 'x-apikey: <YOUR_API_KEY>'3 -H 'Content-Type: application/json'4 -d '{"clientId":"<CLIENT_ID>","clientSecret":"<CLIENT_SECRET>"}'
Your credentials
Replace <YOUR_API_KEY>, <CLIENT_ID>, and <CLIENT_SECRET> with the values provided by tZERO. The token endpoint returns an accessToken valid for 1 hour.