What Autoview does with each alert
This page tells you what Autoview does with an alert after the alert arrives. Each statement comes from the code that runs today. An alert is a text message that holds Autoview commands. Any system that can send an HTTP POST or an email can send one. TradingView is one example. A Python script is another.
Quick reference
| Case | What Autoview does | Where you see it |
|---|---|---|
| The alert arrives | Replies 200, then sends the alert to each linked API key | Webhook History and Event Log |
| The same alert arrives twice | Runs both copies | Two rows in Webhook History, two threads in the Event Log |
| The alert arrives late | Runs it when it arrives | Event Log |
| The exchange returns an error | Writes the error to your log | Event Log, as a failed row |
| The request is rejected | Replies with a 4xx status and runs nothing | Your sender's log, and for most rejections your Webhook History |
How an alert gets to Autoview
There are two ways in: a webhook URL and an email address.
Webhook URL
Each webhook has its own URL. It looks like https://api.autoview.com/hook/<identifier>/. Your sender sends an HTTP POST to that URL.
- Body. Send plain text, a JSON string, or a JSON object with a string
"alert"field. Autoview rejects a form or multipart body with415. It rejects any other JSON shape with400. - Key. If the webhook has a key, put the key in
?key=on the URL or at the start of the text. Without the key, Autoview replies401. The webhook key guide has the details. - Many commands. Autoview splits the text into commands at each new line and at each
|character.
Email address
Add an email address in your account under Email Addresses. Start the email text with the webhook identifier. Autoview reads the first 36 characters as the identifier and runs the rest of the text as the alert. If the text does not start with an identifier, Autoview runs nothing. If the email went to one of your addresses, its text goes to your Event Log so that you can see it.
What the reply means
Autoview replies 200 with the body ok when it accepts the alert. Autoview sends this reply before it sends anything to an exchange. A 200 tells you that Autoview received the alert. It does not tell you that an order filled. To see the result, use the Event Log (see below).
The 200 reply has an x-canonical-id header. Autoview makes a new ID for each request it receives. The same ID joins the request to its rows in the Event Log.
Autoview rejects a request with one of these statuses, and runs nothing:
400: a JSON body in the wrong shape.401: the webhook has a key and the request did not carry it.404: no webhook has this identifier.411: the text has no commands.415: a form or multipart body.422: no API key is linked to the webhook.
A 401 and a 422 also write a row to your Event Log. A 404 writes nothing, because Autoview cannot tell which account the request was for. Why isn't my alert reaching Autoview? helps you find the cause.
One alert, more than one API key
A webhook can have more than one linked API key. Autoview sends the alert to each linked API key as a separate dispatch. On Autoview's order server, the alerts for one API key run one at a time.
When the same alert arrives twice
Autoview runs both copies. Each copy can place an order.
Autoview gives each request a new ID when it arrives. It does not compare a request with the requests before it. Two copies of the same text are two alerts. Each copy gets its own row in Webhook History and its own thread in the Event Log.
The dedupe= parameter does not stop this on the webhook path. On Autoview's order server, a line with dedupe= writes the error "Dedupe is currently not supported." to your Event Log. The other lines of the alert still run.
To stop repeats, stop them at the sender. Duplicate or repeated orders shows the two usual causes.
When an alert arrives late
Autoview does not check the age of an alert. It runs a late alert when the alert arrives, the same as an alert that arrives on time. The order is priced when Autoview receives the alert. When an alert arrives late shows how to keep a late alert from chasing the market.
When the exchange returns an error
Autoview sends each order to the exchange from its order server. If the exchange returns an error, Autoview writes the error to your Event Log as a failed row. When the error text was written for users, the row shows that text. For other errors, the row shows "Unable to process request."
Some exchange connections have a retry setting on the browser extension options page. Autoview's order server has no retry setting. On the order server, those connections make one attempt.
Before you send an alert again by hand, check your orders on the exchange. The first order can be there.
Other rows that tell you an order did not go live
- No active subscription for the exchange. Autoview sends the alert as a dry run. The Event Log row says "No active subscription for this exchange". Managing your subscription shows how to check your plan.
- The broker connection needs a reconnect. Autoview sends nothing for that API key. The Event Log row tells you to reconnect.
- An order limit refused the order. Autoview sends nothing for that API key. The Event Log row gives the reason. Webhook order limits explains these limits.
- Autoview could not pass the alert to its order server. The Event Log shows a failed row.
Where you see each result
Webhook History
Open Webhooks in your account and click History on a webhook. The page shows one row for each request that webhook received, with the time and the text. A rejected request shows the reason in place of the text. A webhook key is not stored in the text.
Event Log
Open Event Log in your account. New rows show up while the page is open. Use the filters to show live orders, dry runs, or failed rows only.
Click Threaded to see one card for each webhook request. Each card holds every row that the request caused, joined by the request ID. Click Fills to see fills. How to read your log tells you how to read the rows.