Developer API

Build trading bots on LOSURIA.

One API key puts your bot on the same rails as the app: read live launches, place standing orders, arm the sniper on Ethereum, Base, Monad and Solana — first-block on Ethereum, endpoint-speed elsewhere, and run non-custodial swaps you sign yourself.

The 1% fee is charged on-chain in the pair, and checked at the relay before broadcast. Your bot pays exactly what the app pays, and no client-side trick removes it. Nothing here is financial advice — you trade your own funds at your own risk.

01 · Quickstart

From key to first call in a minute.

Create a key in the app (API tab — needs an active subscription), drop it in a file, 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.

shell
# 1. save your key next to the script
echo "lsk_your_key_here" > losuria.key

# 2. install the two dependencies
pip install requests pynacl

# 3. run the read-only demo — it moves nothing
python3 losuria_bot.py
python · your first authenticated call
import requests

KEY  = open("losuria.key").read().strip()
BASE = "https://app.losuria.com"
H    = {"Authorization": "Bearer " + KEY}

st = requests.get(BASE + "/api/v1/status", headers=H).json()
print(st["session_address"], st["session_address_sol"])
02 · Custody

Two modes. You choose per strategy.

LOSURIA never holds your main wallet. Your session keys are derived deterministically from your API key — nobody can derive them without it, and the server derives the same public addresses so you can verify them against /status. The starter bot shows the exact derivation.

First-blockcapital stays on your wallet
Set a spending cap once in the app with one passkey. LOSURIA then fills your buy up to the cap as soon as the pool opens — first-block on Ethereum; on Base and Solana as fast as the RPC endpoint you supply allows. Your capital stays on your own wallet, and this mode is not fully non-custodial (Terms §4a), and your bot arms it with no local signing. Endpoints: /api/v1/evm/arm-standing (Ethereum + Base), /api/v1/solana/arm-standing.
Non-custodialyou sign every transaction
No cap. Your bot signs locally; LOSURIA verifies the signer and the fee leg, then broadcasts. LOSURIA holds no key, and a transaction that omits the fee — or is signed by the wrong key — is rejected before it ever reaches the chain. Endpoints: /api/v1/solana/build + /api/v1/solana/relay, /api/v1/relay.
03 · Endpoints

The full surface.

Every endpoint is authenticated with your bearer key. Bodies and responses are JSON. Base URL: https://app.losuria.com.

Read
GET/api/v1/statusKey identity, tier, and your derived EVM + Solana session addresses.
GET/api/v1/launches?minutes=60Recent token launches seen across the supported chains.
GET/api/v1/ordersYour standing orders.
Standing orders
POST/api/v1/ordersStore a buy order; the armed engine executes it when the pool passes your safety filters.
DEL/api/v1/orders/{id}Cancel a standing order.
First-block · capital stays on your wallet
POST/api/v1/evm/arm-standingArm the sniper on ethereum / base within your cap. Base takes your BYO rpc_http.
GET/api/v1/evm/status?chain=Which tokens the sniper has fired on.
POST/api/v1/evm/disarmDisarm and sweep any sniped tokens + native back to your wallet.
POST/api/v1/solana/arm-standingArm all five supported Solana AMM venues within your SPL approval. The response names each venue it armed.
POST/api/v1/solana/disarmDisarm the Solana engine.
Non-custodial · you sign, LOSURIA verifies the fee + relays
POST/api/v1/solana/buildLOSURIA builds the fee-bearing swap and returns the message to sign.
POST/api/v1/solana/relaySubmit your signature; the fee leg is verified before broadcast.
POST/api/v1/relayBroadcast a locally-signed EVM raw transaction after the signer + fee check.
Launchpad
POST/api/v1/launchpad/buildBuild an unsigned launch transaction (name, symbol, supply, LP) for you to sign and send.
Legacy · Smart-Wallet spend permission (not available on current wallets)
POST/api/v1/transferSend native currency (0.05% send fee). Needs an armed Smart-Wallet spend permission; wallets created today are EOAs and cannot arm one, so this returns no_armed_session. Use the first-block and relay endpoints above.
POST/api/v1/swapBuy a token through the same standing spend permission (1% fee). Same precondition, same answer on an EOA wallet.
04 · Recipes

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 multi-venue first-block sniper

Set a Solana cap once in the app, point the bot at your own RPC/websocket, and it fires the first pool that passes your filters across all five venues. Your wSOL stays in your own account.

python
from losuria_bot import Losuria

lo = Losuria()
code, arm = lo.arm_solana(reject_mintable=True, reject_freezable=True,
                          min_liquidity_lamports=50_000_000)
if arm.get("armed"):
    print("watching all venues · cap =", arm["cap_lamports"])
    # the engine now fires the first passing pool; disarm when done:
    # lo.disarm_solana()

Non-custodial swap · sign locally, LOSURIA relays

LOSURIA builds the fee-bearing transaction, your bot signs it with the derived delegate, and LOSURIA verifies the 1% before broadcasting. No cap, no custody.

python
WSOL = "So11111111111111111111111111111111111111112"
USDC = "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"

ok, res = lo.swap_solana(WSOL, USDC, amount=2_000_000, slippage_bps=100)
print("relayed" if ok else "rejected", res)

First-block EVM on your BYO chain

python
# set a cap in the app (API tab · Base), then:
code, arm = lo.arm_evm("base", rpc_http="https://your-base-rpc")
print(arm)  # armed within your cap — relayer fills from your wallet

fired = lo.evm_status("base")[1].get("fired", [])

Standing orders

python
code, made = lo.place_order("base",
    token_out="0x…", max_in_eth=0.05, slippage_bps=300)
oid = made["order"]["id"]
# … later …
lo.cancel_order(oid)
05 · Fees

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, the fee is taken by the immutable Swap Forwarder on Ethereum, the Spend-Swap Executor on Base, and inside the pair by the LOSURIA DEX router on Monad. A trade that routes around them 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 key, your keys

Your API key never leaves your machine except as the HTTPS bearer header to app.losuria.com. The session keys your bot signs with are derived from it locally and are yours alone. Keep the key private; anyone holding it can trade within whatever cap you have set.

06 · Starter bot

~40 lines to your first trade.

The starter bot is a single self-contained file: the authenticated client, the key derivation, and the four recipes above. Two dependencies — requests and pynacl — and it runs a read-only demo out of the box.