Skip to content

Guide

What do Nyria's webhook response codes mean?

Nyria answers every webhook with an HTTP code and a JSON body. A 200 with status processed means Nyria read the alert and handed it to your bots. A 200 can also carry rejected or duplicate, so read the status field. 400 and 404 mean the token in the URL is wrong, 413 a body that is too large, 422 an alert Nyria could not use, and 429 too many alerts too fast.

Official documentation

Read a webhook reply

  1. 1

    Check the HTTP code

    Log or alert on anything that is not 2xx.

  2. 2

    Read the status field

    processed, rejected and duplicate all come back as 200.

  3. 3

    Read the reason

    A rejected alert carries a reason, such as a ticker outside the strategy's list.

  4. 4

    Open the strategy's Logs tab

    Every alert has a row, and a rejected or failed one shows why.

  5. 5

    Fix and resend

    Change the body if you meant to repeat an alert.

The 200 replies

  • processed: Nyria read it and handed it to your bots. Check the bot's Logs tab for the fill.
  • rejected: the ticker is not in the strategy's list, the direction is turned off, or there was no position to close.
  • rejected true: the strategy is not Active.
  • duplicate: a repeat of an earlier body, dropped on purpose.

The error codes

  • 400: the token in the URL is malformed. Copy the URL again.
  • 404: no strategy matches that token. Copy the URL again.
  • 413: the payload is over 256KB. Trim it.
  • 422: Nyria could not use the alert, for example a missing field or an unknown symbol.
  • 429: too many alerts too fast. Wait as long as Retry-After says.
  • 503: a temporary failure reading the alert or fetching market data. Send it again.
  • 500: anything else. The Logs tab has the reason.

Sender tips

  • Set a timeout on every request.
  • A rejection or a duplicate is still a 200, so check status as well as the code.
  • Retries are safe, because an identical body is caught as a duplicate.

Questions

Does a 200 mean an order was placed?
Not always. It can also mean rejected or duplicate. Read the status field and the bot's Logs tab.
What does a 404 mean?
No strategy matches the token in the URL. Copy the webhook URL again from the Integration tab.
What should I do on a 429?
Wait as long as the Retry-After header says, then resend.
Should I retry a 422?
No. Fix the alert first. The error message names the cause.
Where do I see why an alert was refused?
In the strategy's Logs tab.

Next

Try a paper bot first

No card required. Paper is free. Live trading from $15 a month.