API reference ยท Platform
/v1/meGet your key.
Read
The key you called with: its access, the accounts it reaches, the limits you set on it and its budgets.
Responses#
200OK
-
Show 7 fields
-
What you called with: an API key, or an app you signed in to.
One of
keyapp -
The key's id (the part after ppk_test_ or ppk_live_), or the app access's id.
-
Its name (an app: the app's name).
-
Its environment.
One of
livesandbox -
read: look only. trade: also place and cancel.
One of
readtrade -
When it expires; null: never.
-
When it was made.
-
-
The accounts it reaches.
-
all: every account of the environment, new ones too. selected: only those listed.
One of
allselected -
The limits you set on the key.
Show 5 fields
-
The markets the key may trade; empty: every market.
-
The key may only reduce positions.
-
The largest order the key may place, in USD.
-
The largest position the key may hold, in USD.
-
The loss in a trading day at which the key stops trading the account.
-
-
Show 2 fields
-
Reads a minute for this key.
-
Trading calls a minute for this key.
-
401The request has no Authorization header.
{
"error": {
"type": "authentication",
"code": "missing_api_key",
"message": "No API key: send it as Authorization: Bearer <key>.",
"request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
"retryable": false,
"doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#missing_api_key"
}
}403The key only works from the addresses you listed.
{
"error": {
"type": "permission",
"code": "ip_not_allowed",
"message": "This address is not on the key's allowlist.",
"request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
"retryable": false,
"doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#ip_not_allowed"
}
}429A request budget is used up (details.scope says which).
{
"error": {
"type": "rate_limit",
"code": "rate_limited",
"message": "Too many requests: slow down.",
"request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
"retryable": true,
"doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#rate_limited"
}
}500An error we did not expect.
{
"error": {
"type": "server",
"code": "internal_error",
"message": "Something went wrong on our side.",
"request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
"retryable": true,
"doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#internal_error"
}
}503The API is starting and has not loaded your keys yet.
{
"error": {
"type": "engine",
"code": "not_ready",
"message": "The API is starting. Try again in a moment.",
"request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
"retryable": true,
"doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#not_ready"
}
}Errors#
Codes this endpoint can return. Match on the code, never on the message.