Create onchain quote
curl --request POST \
--url https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes \
--header 'API-Key: <api-key>' \
--header 'API-Nonce: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"symbol": "USDC",
"type": "stablecoin",
"wallet": {
"address": "0x8888888888888888888888888888888888888888",
"network": "ethereum"
}
},
"to": {
"symbol": "TSLAx",
"type": "xstock",
"amount": "10"
}
}
'import requests
url = "https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes"
payload = {
"from": {
"symbol": "USDC",
"type": "stablecoin",
"wallet": {
"address": "0x8888888888888888888888888888888888888888",
"network": "ethereum"
}
},
"to": {
"symbol": "TSLAx",
"type": "xstock",
"amount": "10"
}
}
headers = {
"API-Key": "<api-key>",
"API-Sign": "<api-key>",
"API-Nonce": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'API-Key': '<api-key>',
'API-Sign': '<api-key>',
'API-Nonce': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: {
symbol: 'USDC',
type: 'stablecoin',
wallet: {address: '0x8888888888888888888888888888888888888888', network: 'ethereum'}
},
to: {symbol: 'TSLAx', type: 'xstock', amount: '10'}
})
};
fetch('https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes', 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://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes",
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([
'from' => [
'symbol' => 'USDC',
'type' => 'stablecoin',
'wallet' => [
'address' => '0x8888888888888888888888888888888888888888',
'network' => 'ethereum'
]
],
'to' => [
'symbol' => 'TSLAx',
'type' => 'xstock',
'amount' => '10'
]
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"API-Nonce: <api-key>",
"API-Sign: <api-key>",
"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://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes"
payload := strings.NewReader("{\n \"from\": {\n \"symbol\": \"USDC\",\n \"type\": \"stablecoin\",\n \"wallet\": {\n \"address\": \"0x8888888888888888888888888888888888888888\",\n \"network\": \"ethereum\"\n }\n },\n \"to\": {\n \"symbol\": \"TSLAx\",\n \"type\": \"xstock\",\n \"amount\": \"10\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("API-Sign", "<api-key>")
req.Header.Add("API-Nonce", "<api-key>")
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://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes")
.header("API-Key", "<api-key>")
.header("API-Sign", "<api-key>")
.header("API-Nonce", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": {\n \"symbol\": \"USDC\",\n \"type\": \"stablecoin\",\n \"wallet\": {\n \"address\": \"0x8888888888888888888888888888888888888888\",\n \"network\": \"ethereum\"\n }\n },\n \"to\": {\n \"symbol\": \"TSLAx\",\n \"type\": \"xstock\",\n \"amount\": \"10\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["API-Sign"] = '<api-key>'
request["API-Nonce"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": {\n \"symbol\": \"USDC\",\n \"type\": \"stablecoin\",\n \"wallet\": {\n \"address\": \"0x8888888888888888888888888888888888888888\",\n \"network\": \"ethereum\"\n }\n },\n \"to\": {\n \"symbol\": \"TSLAx\",\n \"type\": \"xstock\",\n \"amount\": \"10\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "XQAAAAAAAAAAA1",
"status": "offered",
"expires_at": "2026-04-24T12:34:09Z",
"from": {
"symbol": "USDC",
"type": "stablecoin",
"amount": "1853.4"
},
"to": {
"symbol": "TSLAx",
"type": "xstock",
"amount": "10"
},
"execution_details": {
"chain_id": "1",
"proxy_address": "0x1111111111111111111111111111111111111111",
"proxy_swap_message": {
"atomic_message": {
"quote_id": "0x3333333333333333333333333333333333333333333333333333333333333333",
"expiration": 1777034103,
"incoming_transfer": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x4444444444444444444444444444444444444444",
"token": "0x5555555555555555555555555555555555555555",
"amount": "1853400000"
},
"outgoing_transfer": {
"from": "0x4444444444444444444444444444444444444444",
"to": "0x1111111111111111111111111111111111111111",
"token": "0x6666666666666666666666666666666666666666",
"amount": "10000000000000000000"
}
},
"atomic_signature": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"signature": "0x43ab90a8d9f4208395877c0a602bcd95574e4d39a0a416632861b09487c6f6a234f6e638ef714d6f6847882d557fe1d605587679081e81991f653d15007639741b",
"client_address": "0x8888888888888888888888888888888888888888",
"authorization_deadline": 1777034103
}
}
}
}Onchain quotes
Create onchain quote
Creates a wallet-funded quote and returns onchain execution details.
Set amount on exactly one of from or to; the other side is calculated when the quote is created. The source from.wallet is required.
POST
/
v1
/
accounts
/
{account_id}
/
onchain-quotes
Create onchain quote
curl --request POST \
--url https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes \
--header 'API-Key: <api-key>' \
--header 'API-Nonce: <api-key>' \
--header 'API-Sign: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"from": {
"symbol": "USDC",
"type": "stablecoin",
"wallet": {
"address": "0x8888888888888888888888888888888888888888",
"network": "ethereum"
}
},
"to": {
"symbol": "TSLAx",
"type": "xstock",
"amount": "10"
}
}
'import requests
url = "https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes"
payload = {
"from": {
"symbol": "USDC",
"type": "stablecoin",
"wallet": {
"address": "0x8888888888888888888888888888888888888888",
"network": "ethereum"
}
},
"to": {
"symbol": "TSLAx",
"type": "xstock",
"amount": "10"
}
}
headers = {
"API-Key": "<api-key>",
"API-Sign": "<api-key>",
"API-Nonce": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'API-Key': '<api-key>',
'API-Sign': '<api-key>',
'API-Nonce': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: {
symbol: 'USDC',
type: 'stablecoin',
wallet: {address: '0x8888888888888888888888888888888888888888', network: 'ethereum'}
},
to: {symbol: 'TSLAx', type: 'xstock', amount: '10'}
})
};
fetch('https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes', 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://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes",
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([
'from' => [
'symbol' => 'USDC',
'type' => 'stablecoin',
'wallet' => [
'address' => '0x8888888888888888888888888888888888888888',
'network' => 'ethereum'
]
],
'to' => [
'symbol' => 'TSLAx',
'type' => 'xstock',
'amount' => '10'
]
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"API-Nonce: <api-key>",
"API-Sign: <api-key>",
"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://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes"
payload := strings.NewReader("{\n \"from\": {\n \"symbol\": \"USDC\",\n \"type\": \"stablecoin\",\n \"wallet\": {\n \"address\": \"0x8888888888888888888888888888888888888888\",\n \"network\": \"ethereum\"\n }\n },\n \"to\": {\n \"symbol\": \"TSLAx\",\n \"type\": \"xstock\",\n \"amount\": \"10\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Key", "<api-key>")
req.Header.Add("API-Sign", "<api-key>")
req.Header.Add("API-Nonce", "<api-key>")
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://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes")
.header("API-Key", "<api-key>")
.header("API-Sign", "<api-key>")
.header("API-Nonce", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"from\": {\n \"symbol\": \"USDC\",\n \"type\": \"stablecoin\",\n \"wallet\": {\n \"address\": \"0x8888888888888888888888888888888888888888\",\n \"network\": \"ethereum\"\n }\n },\n \"to\": {\n \"symbol\": \"TSLAx\",\n \"type\": \"xstock\",\n \"amount\": \"10\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.services.payward.com/v1/accounts/{account_id}/onchain-quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["API-Sign"] = '<api-key>'
request["API-Nonce"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"from\": {\n \"symbol\": \"USDC\",\n \"type\": \"stablecoin\",\n \"wallet\": {\n \"address\": \"0x8888888888888888888888888888888888888888\",\n \"network\": \"ethereum\"\n }\n },\n \"to\": {\n \"symbol\": \"TSLAx\",\n \"type\": \"xstock\",\n \"amount\": \"10\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "XQAAAAAAAAAAA1",
"status": "offered",
"expires_at": "2026-04-24T12:34:09Z",
"from": {
"symbol": "USDC",
"type": "stablecoin",
"amount": "1853.4"
},
"to": {
"symbol": "TSLAx",
"type": "xstock",
"amount": "10"
},
"execution_details": {
"chain_id": "1",
"proxy_address": "0x1111111111111111111111111111111111111111",
"proxy_swap_message": {
"atomic_message": {
"quote_id": "0x3333333333333333333333333333333333333333333333333333333333333333",
"expiration": 1777034103,
"incoming_transfer": {
"from": "0x1111111111111111111111111111111111111111",
"to": "0x4444444444444444444444444444444444444444",
"token": "0x5555555555555555555555555555555555555555",
"amount": "1853400000"
},
"outgoing_transfer": {
"from": "0x4444444444444444444444444444444444444444",
"to": "0x1111111111111111111111111111111111111111",
"token": "0x6666666666666666666666666666666666666666",
"amount": "10000000000000000000"
}
},
"atomic_signature": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"signature": "0x43ab90a8d9f4208395877c0a602bcd95574e4d39a0a416632861b09487c6f6a234f6e638ef714d6f6847882d557fe1d605587679081e81991f653d15007639741b",
"client_address": "0x8888888888888888888888888888888888888888",
"authorization_deadline": 1777034103
}
}
}
}Authorizations
Your public API key. Identifies the partner making the request.
HMAC signature over the request, computed with your private key.
Monotonically increasing nonce included in the request signature.
Path Parameters
Globally unique public identifier for an account.
Required string length:
14 - 42Body
application/json
Response
A wallet-funded onchain quote.
Show child attributes
Show child attributes