Account
A Lightspeed wallet is a wallet we hold for you, encrypted under its ls_ key. It trades with that key alone, on the plan of the account it belongs to.
On the dashboard
The dashboard is the simplest place to keep them:
- Make a wallet. Up to 10 per account. Its address,
ls_key and private key are shown once: save them. - See them all. Each wallet with its name, its address on Solscan and its SOL.
- Link one you already have. Paste its
ls_key and it joins your account, so it trades on your plan. - Remove one. It leaves your account and keeps its key and its SOL; it trades again once it is linked to an account with a plan, or with a plan's key in
x-api-key.
Here
The form below makes a wallet without an account. Link it on the dashboard afterwards so it trades on your plan.
Generates a wallet on the server, encrypted under the API key you get back. Nothing is stored in your browser.
Filled in after creating an account, or paste one here. Kept only while this page is open.
From code
Two requests: create an account (no body), read the balance with the key in the x-api-key header.
curl -X POST https://sol.shrine.trade/api/lightspeed/account
curl https://sol.shrine.trade/api/lightspeed/account -H "x-api-key: ls_…"
To move SOL out without importing the private key, POST /api/lightspeed/withdraw with to and amount ("100%" for everything above the network fee), same header.
To race every provider without paying for the copies that lose, make the wallet's nonce account once: see Nonce account.
The create response is { "pubkey", "api_key", "private_key" }, shown once. Fund pubkey with SOL (plus a little for tips and fees); for a coin quoted in USDC or another token, fund the quote as well.
:::caution Your wallet, your key The API key is the key to the wallet. Whoever holds it, or the private key, controls the funds; we cannot recover a lost API key, so keep the private key as your backup. Keep only what you snipe with, withdraw profits, and treat both like a password. If either leaks, create a new account and move the balance. :::
Balance
curl https://sol.shrine.trade/api/lightspeed/account -H "x-api-key: ls_…"
{ "pubkey": "5Vk…nq2", "sol": 1.204, "lamports": 1204000000, "tokens": [ { "mint": "…", "amount": 1250000, "amount_raw": "1250000000000", "decimals": 6 } ] }
Withdraw
Move SOL out, no fee. amount is SOL, or "100%" for everything above the network fee.
curl -X POST https://sol.shrine.trade/api/lightspeed/withdraw \
-H "content-type: application/json" \
-d '{ "apiKey": "ls_…", "to": "<your wallet>", "amount": "100%" }'
Nonce account
With nonce: true on a trade, every provider's copy uses the wallet's durable nonce: the first copy to run uses it up, and the others are dropped before they execute and cost nothing, not even their priority fee (see One fill, never two). The nonce lives in a nonce account, one per wallet, at an address derived from the wallet and controlled by the wallet alone. It holds about 0.001 SOL of rent, paid from the wallet; closing the account gives it back.
Make it once, with the wallet's key:
curl -X POST https://sol.shrine.trade/api/lightspeed/nonce -H "x-api-key: ls_…"
{ "wallet": "5Vk…nq2", "address": "9Qe…7Lm", "exists": true, "nonce": "6Hr…uYw", "sol": 0.00105664, "changed": true, "signature": "3xT…" }
The answer comes once the account is confirmed, a second or two. From then on send "nonce": true on your trades. Calling it again makes nothing new: it answers with the account the wallet has (changed: false).
| Field | ||
|---|---|---|
wallet | string | The wallet the account belongs to. |
address | string | The nonce account. |
exists | boolean | Whether the account exists now. |
nonce | string | Its current value. |
sol | number | SOL in the account. On DELETE, what went back to the wallet. |
changed | boolean | This call made the account (POST) or closed it (DELETE). |
signature | string | The transaction that did it. |
Read it with GET and the same header. Close it with DELETE: its SOL goes back to the wallet. A close is refused while a trade is using the nonce; try again a few seconds later. withdraw with "100%" leaves the nonce account's SOL where it is, so close the account first to take everything out.
curl https://sol.shrine.trade/api/lightspeed/nonce -H "x-api-key: ls_…"
curl -X DELETE https://sol.shrine.trade/api/lightspeed/nonce -H "x-api-key: ls_…"
For your own wallet, POST and DELETE take privateKey in the JSON body, with your plan's key in x-api-key, as a trade does.
If you skip this step, the wallet's first nonce: true trade makes the account by itself and races the usual way meanwhile; its answer says "nonce": "preparing".