Home

Getting set up

Two things to connect: an exchange (only needed for live trading — skip this for paper mode), and where your strategy's decisions come from. This covers the most common setup for each.

Connecting Binance

In your Binance account: API Management → Create API key. Binance's own menu wording shifts from time to time, but the setup is the same wherever it lives:

  1. Create the key, then edit its permissions.
  2. Enable Enable Spot & Margin Trading (read + trade).
  3. Leave Enable Withdrawals off. Latis rejects a Binance key with withdrawal access automatically at connect time — it never needs it, and never asks for it.
  4. Copy the API key and secret somewhere safe — Binance only shows the secret once. Paste both into Latis under Exchange connections.
Want to test with zero real funds first? Choose Testnet instead of Live when connecting — that uses a key created on testnet.binance.vision instead of your real Binance account, so a bot can place real orders against a real (fake-money) matching engine before you risk anything.

Bringing your own strategy

A "bring your own" bot doesn't run inside Latis — it runs wherever you like, and just tells Latis what to do by sending one HTTP request. Create a BYOS bot on the Bots page and you'll get a private webhook URL, shown once and always available again from that bot's own detail page. Anything capable of sending a POST request can drive it — a TradingView alert, a Python script, a cron job, another SaaS product's own webhook feature. Send this JSON body:

POST https://<your Latis domain>/api/strategy-webhook/<your bot's secret> Content-Type: application/json { "action": "buy", // "buy" | "sell" | "hold" | "close" "sizeFraction": 1.0 // optional, 0–1, defaults to 1.0 }

sizeFraction scales against the bot's own configured max position size — it can only ever request a fraction of what you've already capped it at, never more. close flattens the bot's entire current position, ignoring sizing entirely. A bot only ever acts on one signal per its own check interval — send them faster than that and the extra ones get a clean rejection rather than queuing up and firing late.

Using TradingView alerts

TradingView's own alert system sends exactly this kind of request — a URL and a JSON message you write, POSTed the moment your alert condition fires. No separate integration needed on our end; this just works because both sides speak plain webhooks.

  1. Create your alert in TradingView, on a Pine strategy or indicator.
  2. Under Notifications, enable Webhook URL and paste your bot's webhook URL.
  3. In the Message field, enter the JSON body above — either a fixed action, or built from TradingView's own alert placeholders, e.g. {"action": "{{strategy.order.action}}"}.
Webhook alerts are a paid TradingView feature — not available on their free plan as of this writing. Check your current TradingView plan if the webhook option isn't showing up.

Something not working the way this describes? Tell us — real exchange and TradingView UIs shift over time, and we'd rather fix the docs than have you stuck.