Build the bot. Keep the key.
LOSURIA gives a developer a cross-device passkey wallet, an API key for bot access and a bounded order-to-relay path. Your code builds the intent, the owner signs the exact limits and the relay submits only what the signature authorizes.
The 1% fee is checked in the execution boundary before broadcast. Your bot cannot remove it or widen the order. Value-moving routes remain tier- and safety-gated; nothing here is financial advice, and you trade only your own funds.
From key to first call in a minute.
Create a key in the app (API tab), inject it from your secret manager into the process environment, and authenticate every request with a bearer header. Your key is a secret: send it only over HTTPS in the header, never in a URL or query string.
# 1. Inject LOSURIA_API_KEY from your secret manager for this process only. # Do not write it to a plaintext file or commit it. # Set LOSURIA_API_KEY in this process from your secret manager before running the bot. # 2. install the dependencies for reads, Solana relay, and EVM signing pip install requests web3 pynacl base58 # 3. run the read-only demo — it moves nothing python3 losuria_bot.py
import os, requests KEY = os.environ["LOSURIA_API_KEY"] BASE = "https://app.losuria.com" H = {"Authorization": "Bearer " + KEY} st = requests.get(BASE + "/api/v1/status", headers=H).json() print(st["key_id"], st.get("tier"))
A local command line for the same signed rails.
Install the current LOSURIA CLI v0.6.0 for read-only API diagnostics, unsigned Solana builder preparation, bounded bot plans and offline contract-call inspection. The verified release includes the canonical bot entry point, so losuria bot works after the one-line install. It uses the same owner-bound platform contract as the app; it never stores a wallet key, signs a transaction or broadcasts one.
# HTTPS bootstraps; the installer verifies the signed release before install. curl -fsSL https://losuria.com/losuria-install.sh | sh losuria losuria --version # Optional: enter the key once at a hidden prompt. losuria api configure losuria api doctor
api read and api doctor use a fixed HTTPS route allowlist and redact sensitive response fields. They do not expose wallet data in the command output.api build, contract inspect and bot-plan produce bounded input for the existing owner-signing flow. The separate local signing and relay decision remains explicit.You sign. We pick the block.
The current execution path holds no Wallet-owner key. There is no API session to arm or budget cap to configure: each amount is inside its Owner signature. An EVM executor allowance may be reusable, but cannot move value without one of those signatures.
/api/v1/orders. The watcher submits only that signature. Deleting the API order removes it from the hosted watcher; cryptographic termination requires the Owner's on-chain cancel, expiry, or revoking the executor allowance.Intelligence: facts you can build on.
Opens on an active Pro or Whale plan. It serves what launched and lets you inspect your own activity — and read handlers cannot move value: they hold no wallet signer or session key. Judgement and signing stay in your own code. The paid Intelligence allowance is 2,000 requests per UTC day on Pro and 20,000 on Whale; reading its meter does not consume that allowance. Signed orders, automation and relays remain Whale-gated; their execution and safety lanes are separate, so an Intelligence meter cannot block cancellation, recovery or legitimate execution. Per-key and per-route anti-abuse buckets protect every lane independently. Money-moving access remains subject to the documented owner-signature, fee and safety checks. For clarity, money-moving access will be enabled only when the documented safety requirements are met. The launch proof page shows recorded launches with their deployment transaction, without signup.
The full surface.
Every endpoint is authenticated with your bearer key. Bodies and responses are JSON. Base URL: https://app.losuria.com.
execution_ready and execution_block_reason. A limit buy requires a native LOSURIA DEX pool; stale or external-only rows remain readable but are never submitted.execution_ready and execution_block_reason. Stale or external-only rows remain readable but no slice is submitted.expected_pool, and min_out_floor from the same RPC quote. LOSURIA may strengthen, but never lower, that floor; your client verifies the pool, fee, route, and every instruction before signing.Strategies, copy-paste.
These use the Losuria client from the starter bot. Tune the filters, sizes and RPC to your own strategy — they are starting points, not a turnkey money machine.
Solana swap · explicit amount, owner-wallet signature
For a direct swap, build one fee-bearing transaction for an explicit mint and amount, sign it locally, and let LOSURIA verify the fee before relay. For background execution, create a conditional on-chain order whose amount, deadlines, pool protections and exits are fixed by the same owner signature.
Non-custodial swap · sign locally, LOSURIA relays
LOSURIA builds the fee-bearing transaction, your bot signs it locally, and LOSURIA verifies the 1% before broadcasting. No cap, no custody.
WSOL = "So11111111111111111111111111111111111111112" USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" MIN_OUT = int(os.environ["LOSURIA_SOL_MIN_OUT"]) # from your RPC quote POOL = os.environ["LOSURIA_SOL_POOL"] # from the same RPC quote ok, res = lo.swap_solana(WSOL, USDC, POOL, amount=2_000_000, min_out_floor=MIN_OUT, slippage_bps=100) print("relayed" if ok else "rejected", res)
First-block EVM on your BYO chain
import os token = os.environ["LOSURIA_BASE_TOKEN"] amount = int(os.environ.get("LOSURIA_AMOUNT_WEI", "2000000000000000")) code, result = lo.snipe("base", token, amount) print(result) # the owner signature is bounded to this token and amount
Owner-signed orders
import os token = os.environ["LOSURIA_BASE_TOKEN"] amount = int(os.environ.get("LOSURIA_AMOUNT_WEI", "2000000000000000")) code, made = lo.snipe("base", token, amount) if code == 200: print("signed order accepted", made) else: print("refused", made)
Predictable under load. Safe under failure.
The execution API uses a per-key anti-abuse bucket: 25 requests/second, burst 300. Independent edge ceilings apply by route: reads 250/600, quotes 50/100, credential issuance 1/30, signed submissions 2/20, and safety 10/120 (steady RPS/burst). GET /api/v1/status returns the current per-key budget as rate_limit. These are anti-abuse controls, not billing; safety actions and order cancellation remain outside commercial execution usage.
{"error":"machine_readable_code","error_id":"…"}. Keep error_id for support and logs; it identifies the server-side trace without exposing a request body or secret.code, result = lo.snipe("base", token, amount) if code == 200: print("signed order accepted", result) elif code == 429: # Do not resend blindly. Check the authoritative order state first. print("orders", lo.orders()) else: print("failed", result.get("error"), result.get("error_id"))
One percent, enforced, not negotiable.
Swaps and snipes carry a 1% fee; native sends carry 0.05%. There is no separate fee for API traffic — a bot pays the same rate as a tap in the app.
- On EVM, owner-signed execution uses the immutable V5 verifier published for Ethereum, Base and Monad. Swap Forwarder and LOSURIA DEX fees remain enforced on their respective routes; a trade that bypasses the required fee path is simply not a LOSURIA trade.
- On Solana, the non-custodial relay parses your signed transaction and confirms the fee leg to the operator sink before it broadcasts. A transaction missing the fee — or signed by the wrong key — is rejected, never submitted.
- Every forwarder is on-chain and source-verified. You can read the exact fee math yourself on the Verify and Architecture pages.
Your API key never leaves your machine except as the HTTPS bearer header to app.losuria.com. Your bot signs locally, with its own key, in every money-moving mode; the current execution path holds no Wallet-owner key; the API credential never substitutes for the owner-wallet signature. Keep the API key private: it authenticates your reads and signed-order submissions, but it never replaces your owner-wallet signature.
One file from first call to first strategy.
The starter bot is a single self-contained file: the authenticated client, local signature verification, and the four recipes above. Its documented dependencies cover HTTP reads, EVM signing and Solana signing without hidden setup; signing libraries load only when their command is used.