Log in with signed wallet transaction
curl --request POST \
--url https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction \
--header 'Content-Type: application/json' \
--data '
{
"nonce_id": "string",
"signed_transaction": "string",
"wallet_pubkey": "string"
}
'import requests
url = "https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction"
payload = {
"nonce_id": "string",
"signed_transaction": "string",
"wallet_pubkey": "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({nonce_id: 'string', signed_transaction: 'string', wallet_pubkey: 'string'})
};
fetch('https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction', 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://perp-api.phoenix.trade/v1/auth/login/wallet/transaction",
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([
'nonce_id' => 'string',
'signed_transaction' => 'string',
'wallet_pubkey' => '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://perp-api.phoenix.trade/v1/auth/login/wallet/transaction"
payload := strings.NewReader("{\n \"nonce_id\": \"string\",\n \"signed_transaction\": \"string\",\n \"wallet_pubkey\": \"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://perp-api.phoenix.trade/v1/auth/login/wallet/transaction")
.header("Content-Type", "application/json")
.body("{\n \"nonce_id\": \"string\",\n \"signed_transaction\": \"string\",\n \"wallet_pubkey\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction")
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 \"nonce_id\": \"string\",\n \"signed_transaction\": \"string\",\n \"wallet_pubkey\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"expires_in": 1,
"pop_key": "<string>",
"refresh_expires_in": 1,
"refresh_token": "<string>",
"token_type": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Auth
Log in with signed wallet transaction
Handles POST /v1/auth/login/wallet/transaction via post.v1.auth.login.wallet.transaction.
POST
/
v1
/
auth
/
login
/
wallet
/
transaction
Log in with signed wallet transaction
curl --request POST \
--url https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction \
--header 'Content-Type: application/json' \
--data '
{
"nonce_id": "string",
"signed_transaction": "string",
"wallet_pubkey": "string"
}
'import requests
url = "https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction"
payload = {
"nonce_id": "string",
"signed_transaction": "string",
"wallet_pubkey": "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({nonce_id: 'string', signed_transaction: 'string', wallet_pubkey: 'string'})
};
fetch('https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction', 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://perp-api.phoenix.trade/v1/auth/login/wallet/transaction",
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([
'nonce_id' => 'string',
'signed_transaction' => 'string',
'wallet_pubkey' => '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://perp-api.phoenix.trade/v1/auth/login/wallet/transaction"
payload := strings.NewReader("{\n \"nonce_id\": \"string\",\n \"signed_transaction\": \"string\",\n \"wallet_pubkey\": \"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://perp-api.phoenix.trade/v1/auth/login/wallet/transaction")
.header("Content-Type", "application/json")
.body("{\n \"nonce_id\": \"string\",\n \"signed_transaction\": \"string\",\n \"wallet_pubkey\": \"string\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://perp-api.phoenix.trade/v1/auth/login/wallet/transaction")
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 \"nonce_id\": \"string\",\n \"signed_transaction\": \"string\",\n \"wallet_pubkey\": \"string\"\n}"
response = http.request(request)
puts response.read_body{
"access_token": "<string>",
"expires_in": 1,
"pop_key": "<string>",
"refresh_expires_in": 1,
"refresh_token": "<string>",
"token_type": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Body
application/json
JSON request payload for post.v1.auth.login.wallet.transaction.
Echo of the nonce_id returned from the challenge endpoint.
Base64-encoded fully-signed Solana legacy transaction (bincode wire
format). Must be the challenge transaction signed by wallet_pubkey.
Wallets are permitted to include additional ComputeBudget or
Lighthouse instructions before signing (in any position); any other
instruction (other than the Memo issued by the server) is rejected.
The server verifies the signature, the memo payload, and that the
message still uses the issued blockhash so the signed bytes are
never broadcastable on-chain.