Skip to main content
POST
/
v1
/
wallets
/
register
Register Wallet
curl --request POST \
  --url https://api.lasersell.io/v1/wallets/register \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  "signature": "<string>",
  "message": "lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000",
  "label": "My Trading Wallet"
}
'
{
  "wallet_pubkey": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
  "registered": true
}

SDK Usage

Generate Proof

Use the SDK’s proveOwnership helper to generate a WalletProof locally. This is a pure cryptographic operation with no network call.
import { proveOwnership } from "@lasersell/lasersell-sdk";

const proof = proveOwnership(keypair);
// proof = { walletPubkey, signature, message }

Register

Send the proof to the API to register the wallet.
const client = ExitApiClient.withApiKey(apiKey);
await client.registerWallet(proof, "My Wallet");

Connect with Wallets (one step)

Convenience method that registers wallets and connects to the stream in one call.
import { StreamClient, proveOwnership } from "@lasersell/lasersell-sdk";

const proof = proveOwnership(keypair);
const client = new StreamClient(apiKey);
const session = await client.connectWithWallets(
  [proof],
  { target_profit_pct: 50, stop_loss_pct: 10 },
  120, // deadline_timeout_sec
);

Authorizations

x-api-key
string
header
required

Your LaserSell API key. Obtain one from the LaserSell dashboard.

Body

application/json
wallet_pubkey
string
required

Solana wallet public key to register (base58).

Example:

"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"

signature
string
required

Ed25519 signature of the message, base58-encoded.

message
string
required

Structured message in the format lasersell-register:<pubkey>:<unix_timestamp>. The timestamp must be within 5 minutes of the server's current time.

Example:

"lasersell-register:9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM:1706000000"

label
string

Optional human-readable label for the wallet.

Example:

"My Trading Wallet"

Response

Wallet registered successfully.

wallet_pubkey
string
required

The registered wallet public key.

Example:

"9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"

registered
boolean
required

Whether the wallet was successfully registered.

Example:

true