PhoenixPerpetualsDocs API v1
Get an API key

API reference ยท TradingView

GET/v1/tradingview/hooks/{hook_id}/alerts

List a link's alerts⁠.

Read

Every alert the link received, newest first, refused ones included, with what each did and why.

Path parameters#

  • hook_idstringrequired

    The TradingView link.

Query parameters#

  • statusstring

    Only alerts with this status.

  • limitinteger

    Page size.

  • cursorstring

    next_cursor from the previous page, with the same filters.

Responses#

200OK
  • idstringrequired

    The alert.

  • hook_idstringrequired

    Its link.

  • account_idstringrequired

    The account number.

  • statusstringrequired

    What it did.

    One ofprocessingplacedpartialdry_runduplicateskippedrefusedfailedrate_limited

  • reasonstring or nullrequired

    Why it placed nothing (or not all): a reason code.

  • reason_textstring or nullrequired

    That reason in words.

  • formatstring or nullrequired

    How the message was read: universal, pickmytrade, traderspost, pineconnector, text.

  • marketstring or nullrequired

    The market it named.

  • actionstring or nullrequired

    Its action.

  • messagestring or nullrequired

    The message as kept (credentials masked).

  • senderstring or nullrequired

    The sender's address, its end masked.

  • planobject or nullrequired

    What it was to do: { legs } or { skip } or { refuse }.

  • resultsarray of objectrequired

    What each leg did.

  • detailsobject or nullrequired

    More about a refusal.

  • duplicate_ofstring or nullrequired

    The alert this one repeats.

  • repeat_countintegerrequired

    Refusals folded into this row (rate limits).

  • received_atinteger, Unix msrequired

    When it came.

  • finished_atinteger, Unix ms or nullrequired

    When it was done.

400A query or path parameter is out of range or the wrong kind.
{
  "error": {
    "type": "invalid_request",
    "code": "invalid_parameter",
    "message": "A parameter has a value this route does not take.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#invalid_parameter"
  }
}
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"
  }
}
404The id is unknown, revoked, or belongs to another customer or environment.
{
  "error": {
    "type": "not_found",
    "code": "tradingview_hook_not_found",
    "message": "No TradingView link with that id.",
    "request_id": "req_0f9c2a7d8e1b4c6a9f3e5d7b1a2c4e6f",
    "retryable": false,
    "doc_url": "https://docs.phoenixperpsfunding.com/reference/errors#tradingview_hook_not_found"
  }
}
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.

Guides, endpoints, fields and error codes.