Get the calling key
curl --request GET \
--url https://tradingapi.dev/v1/api_key \
--header 'Authorization: Bearer <token>'import requests
url = "https://tradingapi.dev/v1/api_key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://tradingapi.dev/v1/api_key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://tradingapi.dev/v1/api_key"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "api_key",
"name": "research-agent",
"limits": {
"markets": [
"BTC",
"ETH",
"SOL"
],
"max_order_value": "250.00",
"max_daily_value": "1000.00"
},
"usage": {
"daily_value_used": "842.60",
"daily_value_remaining": "157.40",
"next_release": {
"at": "2026-09-27T18:02:40.000Z",
"value": "250.00"
}
}
}{
"error": {
"type": "authentication",
"code": "invalid_api_key",
"message": "This API key is not valid. It may have been revoked.",
"param": null,
"hint": "Send a current key as Authorization: Bearer tapi_…. Keys are created and revoked on the account page.",
"details": {},
"errors": [],
"retryable": false,
"doc_url": "https://docs.tradingapi.dev/api-reference/errors#invalid_api_key"
}
}{
"error": {
"type": "rate_limited",
"code": "rate_limited",
"message": "This key made too many requests; retry in 1 s.",
"param": null,
"hint": "Slow down: each key may make 10 requests at once, then 5 a second.",
"details": {},
"errors": [],
"retryable": true,
"retry_after": "2026-09-28T14:05:12.000Z",
"doc_url": "https://docs.tradingapi.dev/api-reference/errors#rate_limited"
}
}Account
Get the calling key
Returns the limits of the API key making the request, and how much of its daily limit is used. Call it first to find out what the key may do. Limits are set on the account page, never through the API.
GET
/
v1
/
api_key
Get the calling key
curl --request GET \
--url https://tradingapi.dev/v1/api_key \
--header 'Authorization: Bearer <token>'import requests
url = "https://tradingapi.dev/v1/api_key"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://tradingapi.dev/v1/api_key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://tradingapi.dev/v1/api_key"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "api_key",
"name": "research-agent",
"limits": {
"markets": [
"BTC",
"ETH",
"SOL"
],
"max_order_value": "250.00",
"max_daily_value": "1000.00"
},
"usage": {
"daily_value_used": "842.60",
"daily_value_remaining": "157.40",
"next_release": {
"at": "2026-09-27T18:02:40.000Z",
"value": "250.00"
}
}
}{
"error": {
"type": "authentication",
"code": "invalid_api_key",
"message": "This API key is not valid. It may have been revoked.",
"param": null,
"hint": "Send a current key as Authorization: Bearer tapi_…. Keys are created and revoked on the account page.",
"details": {},
"errors": [],
"retryable": false,
"doc_url": "https://docs.tradingapi.dev/api-reference/errors#invalid_api_key"
}
}{
"error": {
"type": "rate_limited",
"code": "rate_limited",
"message": "This key made too many requests; retry in 1 s.",
"param": null,
"hint": "Slow down: each key may make 10 requests at once, then 5 a second.",
"details": {},
"errors": [],
"retryable": true,
"retry_after": "2026-09-28T14:05:12.000Z",
"doc_url": "https://docs.tradingapi.dev/api-reference/errors#rate_limited"
}
}Authorizations
An API key from the account page, sent as Authorization: Bearer tapi_….
Response
The calling key.
Allowed value:
"api_key"Hide child attributes
Hide child attributes
The value of orders this key placed in the last 24 hours. Reduce-only orders and closes don't count.