curl --request POST \
--url https://purps.lol/api/v2/coins/{mint}/authority/prepare \
--header 'Content-Type: application/json' \
--data '
{
"wallet": "<string>",
"action": {
"market": "<string>",
"pct": 123,
"to": "<string>",
"leverage": 123,
"usdc": 123
},
"config": {
"splitBuybackBps": 123,
"splitMarginBps": 123,
"splitReserveBps": 123,
"perpLegs": [
{}
],
"payoutMint": "<string>",
"payoutMintsExtra": [
"<string>"
],
"payoutMint2": "<string>",
"strategy": {},
"ownerControls": true
},
"note": "<string>",
"payoutWallet": "<string>"
}
'import requests
url = "https://purps.lol/api/v2/coins/{mint}/authority/prepare"
payload = {
"wallet": "<string>",
"action": {
"market": "<string>",
"pct": 123,
"to": "<string>",
"leverage": 123,
"usdc": 123
},
"config": {
"splitBuybackBps": 123,
"splitMarginBps": 123,
"splitReserveBps": 123,
"perpLegs": [{}],
"payoutMint": "<string>",
"payoutMintsExtra": ["<string>"],
"payoutMint2": "<string>",
"strategy": {},
"ownerControls": True
},
"note": "<string>",
"payoutWallet": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallet: '<string>',
action: {market: '<string>', pct: 123, to: '<string>', leverage: 123, usdc: 123},
config: {
splitBuybackBps: 123,
splitMarginBps: 123,
splitReserveBps: 123,
perpLegs: [{}],
payoutMint: '<string>',
payoutMintsExtra: ['<string>'],
payoutMint2: '<string>',
strategy: {},
ownerControls: true
},
note: '<string>',
payoutWallet: '<string>'
})
};
fetch('https://purps.lol/api/v2/coins/{mint}/authority/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://purps.lol/api/v2/coins/{mint}/authority/prepare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallet' => '<string>',
'action' => [
'market' => '<string>',
'pct' => 123,
'to' => '<string>',
'leverage' => 123,
'usdc' => 123
],
'config' => [
'splitBuybackBps' => 123,
'splitMarginBps' => 123,
'splitReserveBps' => 123,
'perpLegs' => [
[
]
],
'payoutMint' => '<string>',
'payoutMintsExtra' => [
'<string>'
],
'payoutMint2' => '<string>',
'strategy' => [
],
'ownerControls' => true
],
'note' => '<string>',
'payoutWallet' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://purps.lol/api/v2/coins/{mint}/authority/prepare"
payload := strings.NewReader("{\n \"wallet\": \"<string>\",\n \"action\": {\n \"market\": \"<string>\",\n \"pct\": 123,\n \"to\": \"<string>\",\n \"leverage\": 123,\n \"usdc\": 123\n },\n \"config\": {\n \"splitBuybackBps\": 123,\n \"splitMarginBps\": 123,\n \"splitReserveBps\": 123,\n \"perpLegs\": [\n {}\n ],\n \"payoutMint\": \"<string>\",\n \"payoutMintsExtra\": [\n \"<string>\"\n ],\n \"payoutMint2\": \"<string>\",\n \"strategy\": {},\n \"ownerControls\": true\n },\n \"note\": \"<string>\",\n \"payoutWallet\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://purps.lol/api/v2/coins/{mint}/authority/prepare")
.header("Content-Type", "application/json")
.body("{\n \"wallet\": \"<string>\",\n \"action\": {\n \"market\": \"<string>\",\n \"pct\": 123,\n \"to\": \"<string>\",\n \"leverage\": 123,\n \"usdc\": 123\n },\n \"config\": {\n \"splitBuybackBps\": 123,\n \"splitMarginBps\": 123,\n \"splitReserveBps\": 123,\n \"perpLegs\": [\n {}\n ],\n \"payoutMint\": \"<string>\",\n \"payoutMintsExtra\": [\n \"<string>\"\n ],\n \"payoutMint2\": \"<string>\",\n \"strategy\": {},\n \"ownerControls\": true\n },\n \"note\": \"<string>\",\n \"payoutWallet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://purps.lol/api/v2/coins/{mint}/authority/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet\": \"<string>\",\n \"action\": {\n \"market\": \"<string>\",\n \"pct\": 123,\n \"to\": \"<string>\",\n \"leverage\": 123,\n \"usdc\": 123\n },\n \"config\": {\n \"splitBuybackBps\": 123,\n \"splitMarginBps\": 123,\n \"splitReserveBps\": 123,\n \"perpLegs\": [\n {}\n ],\n \"payoutMint\": \"<string>\",\n \"payoutMintsExtra\": [\n \"<string>\"\n ],\n \"payoutMint2\": \"<string>\",\n \"strategy\": {},\n \"ownerControls\": true\n },\n \"note\": \"<string>\",\n \"payoutWallet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"kind": "action",
"wallet": "<string>",
"ts": 123,
"nonce": "<string>",
"message": "<string>",
"hash": "<string>",
"expiresInSeconds": 123
}
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}Prepare a change
Step 1 of a change through creator authority. Say which wallet will sign and what it will do (kind: act on a position, change the strategy, ask for authority, or hand the coin on), and get back the exact message to sign plus a nonce bound to this coin, this wallet and this exact action. The message is plain English and is the consent: it says what will happen (does: or sets:) and carries your why: note, which holders read on the Changes tab. Sign exactly that string. Nothing is stored or spent here; every check that guards money runs at submit, on the server’s own figures. This step only refuses what can never work: the flagship (403), a coin that is not a purps.lol launch or has no strategy yet (404), a frozen coin (423), a request while authority is closed to new coins (403) or already on (409), a malformed action, config or note (400), or a server with signing not set up (503).
curl --request POST \
--url https://purps.lol/api/v2/coins/{mint}/authority/prepare \
--header 'Content-Type: application/json' \
--data '
{
"wallet": "<string>",
"action": {
"market": "<string>",
"pct": 123,
"to": "<string>",
"leverage": 123,
"usdc": 123
},
"config": {
"splitBuybackBps": 123,
"splitMarginBps": 123,
"splitReserveBps": 123,
"perpLegs": [
{}
],
"payoutMint": "<string>",
"payoutMintsExtra": [
"<string>"
],
"payoutMint2": "<string>",
"strategy": {},
"ownerControls": true
},
"note": "<string>",
"payoutWallet": "<string>"
}
'import requests
url = "https://purps.lol/api/v2/coins/{mint}/authority/prepare"
payload = {
"wallet": "<string>",
"action": {
"market": "<string>",
"pct": 123,
"to": "<string>",
"leverage": 123,
"usdc": 123
},
"config": {
"splitBuybackBps": 123,
"splitMarginBps": 123,
"splitReserveBps": 123,
"perpLegs": [{}],
"payoutMint": "<string>",
"payoutMintsExtra": ["<string>"],
"payoutMint2": "<string>",
"strategy": {},
"ownerControls": True
},
"note": "<string>",
"payoutWallet": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
wallet: '<string>',
action: {market: '<string>', pct: 123, to: '<string>', leverage: 123, usdc: 123},
config: {
splitBuybackBps: 123,
splitMarginBps: 123,
splitReserveBps: 123,
perpLegs: [{}],
payoutMint: '<string>',
payoutMintsExtra: ['<string>'],
payoutMint2: '<string>',
strategy: {},
ownerControls: true
},
note: '<string>',
payoutWallet: '<string>'
})
};
fetch('https://purps.lol/api/v2/coins/{mint}/authority/prepare', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://purps.lol/api/v2/coins/{mint}/authority/prepare",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'wallet' => '<string>',
'action' => [
'market' => '<string>',
'pct' => 123,
'to' => '<string>',
'leverage' => 123,
'usdc' => 123
],
'config' => [
'splitBuybackBps' => 123,
'splitMarginBps' => 123,
'splitReserveBps' => 123,
'perpLegs' => [
[
]
],
'payoutMint' => '<string>',
'payoutMintsExtra' => [
'<string>'
],
'payoutMint2' => '<string>',
'strategy' => [
],
'ownerControls' => true
],
'note' => '<string>',
'payoutWallet' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://purps.lol/api/v2/coins/{mint}/authority/prepare"
payload := strings.NewReader("{\n \"wallet\": \"<string>\",\n \"action\": {\n \"market\": \"<string>\",\n \"pct\": 123,\n \"to\": \"<string>\",\n \"leverage\": 123,\n \"usdc\": 123\n },\n \"config\": {\n \"splitBuybackBps\": 123,\n \"splitMarginBps\": 123,\n \"splitReserveBps\": 123,\n \"perpLegs\": [\n {}\n ],\n \"payoutMint\": \"<string>\",\n \"payoutMintsExtra\": [\n \"<string>\"\n ],\n \"payoutMint2\": \"<string>\",\n \"strategy\": {},\n \"ownerControls\": true\n },\n \"note\": \"<string>\",\n \"payoutWallet\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://purps.lol/api/v2/coins/{mint}/authority/prepare")
.header("Content-Type", "application/json")
.body("{\n \"wallet\": \"<string>\",\n \"action\": {\n \"market\": \"<string>\",\n \"pct\": 123,\n \"to\": \"<string>\",\n \"leverage\": 123,\n \"usdc\": 123\n },\n \"config\": {\n \"splitBuybackBps\": 123,\n \"splitMarginBps\": 123,\n \"splitReserveBps\": 123,\n \"perpLegs\": [\n {}\n ],\n \"payoutMint\": \"<string>\",\n \"payoutMintsExtra\": [\n \"<string>\"\n ],\n \"payoutMint2\": \"<string>\",\n \"strategy\": {},\n \"ownerControls\": true\n },\n \"note\": \"<string>\",\n \"payoutWallet\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://purps.lol/api/v2/coins/{mint}/authority/prepare")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"wallet\": \"<string>\",\n \"action\": {\n \"market\": \"<string>\",\n \"pct\": 123,\n \"to\": \"<string>\",\n \"leverage\": 123,\n \"usdc\": 123\n },\n \"config\": {\n \"splitBuybackBps\": 123,\n \"splitMarginBps\": 123,\n \"splitReserveBps\": 123,\n \"perpLegs\": [\n {}\n ],\n \"payoutMint\": \"<string>\",\n \"payoutMintsExtra\": [\n \"<string>\"\n ],\n \"payoutMint2\": \"<string>\",\n \"strategy\": {},\n \"ownerControls\": true\n },\n \"note\": \"<string>\",\n \"payoutWallet\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"data": {
"kind": "action",
"wallet": "<string>",
"ts": 123,
"nonce": "<string>",
"message": "<string>",
"hash": "<string>",
"expiresInSeconds": 123
}
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}{
"ok": true,
"error": "<string>"
}Path Parameters
The token's mint address (Solana) or contract address (Robinhood Chain).
Body
The Solana wallet that will sign: the coin's owner (from /coins/{mint}/authority), or a platform admin wallet for action and strategy.
action acts on one position. strategy replaces the coin's whole strategy. request asks for creator authority on a coin from before it existed. handover hands the creator rewards, and the authority, to another wallet.
action, strategy, request, handover action only: what to do.
Show child attributes
Show child attributes
strategy only: the whole new config. Sent byte-for-byte the same to submit; its hash is in the message.
Show child attributes
Show child attributes
action and strategy: required, 3 to 140 characters on one line, your reason. It is in the signed words and holders read it. request: optional, up to 500 characters on one line. handover: none.
handover only: the wallet to hand the coin to. A plain wallet, not the coin's own wallet or a platform wallet.