Request a Mint or Redeem Attestation
curl --request POST \
--url https://api.gm.ondo.finance/v1/attestations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"symbol": "AAPLon",
"tokenAmount": "5.000000000000000000",
"userAddress": "7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2"
}
'import requests
url = "https://api.gm.ondo.finance/v1/attestations"
payload = {
"symbol": "AAPLon",
"tokenAmount": "5.000000000000000000",
"userAddress": "7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: 'AAPLon',
tokenAmount: '5.000000000000000000',
userAddress: '7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2'
})
};
fetch('https://api.gm.ondo.finance/v1/attestations', 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.gm.ondo.finance/v1/attestations",
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([
'symbol' => 'AAPLon',
'tokenAmount' => '5.000000000000000000',
'userAddress' => '7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.gm.ondo.finance/v1/attestations"
payload := strings.NewReader("{\n \"symbol\": \"AAPLon\",\n \"tokenAmount\": \"5.000000000000000000\",\n \"userAddress\": \"7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.gm.ondo.finance/v1/attestations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"AAPLon\",\n \"tokenAmount\": \"5.000000000000000000\",\n \"userAddress\": \"7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gm.ondo.finance/v1/attestations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"AAPLon\",\n \"tokenAmount\": \"5.000000000000000000\",\n \"userAddress\": \"7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2\"\n}"
response = http.request(request)
puts response.read_body{
"attestationId": "229852750420835981756873903928305653446",
"userId": "0x474d0000000000009310097834e2c7af00000000000000000000000000000000",
"chainId": "1",
"symbol": "AAPLon",
"ticker": "AAPL",
"assetAddress": "0x14c3abf95cb9c93a8b82c1cdcb76d72cb87b2d4c",
"side": "0",
"tokenAmount": "5000000000000000000",
"price": "225273151158540753535",
"expiration": 1746655938,
"signature": "kMecIrsGFdoAdxzRq2bPo07FWP2QyrxWfjrSMAdIZXNq3bXQnWx27aTKyt9fJiXWrzShYemxA/0RengNqNJ6bBs=",
"additionalData": ""
}Attestations
Request a Mint or Redeem Attestation
An attestation is a signed payload that authorizes a user to mint or redeem tokens. Each attestation is only valid for a limited time and is determined by the duration in the request. A user can specify a duration of short for a tighter price spread or long for an extended validity period.
Note: There are specific user and session limits which can prevent the creation of an attestation. For more information on limits, see the Get Trading Limits endpoint.
See also: Error Codes
POST
/
v1
/
attestations
Request a Mint or Redeem Attestation
curl --request POST \
--url https://api.gm.ondo.finance/v1/attestations \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"symbol": "AAPLon",
"tokenAmount": "5.000000000000000000",
"userAddress": "7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2"
}
'import requests
url = "https://api.gm.ondo.finance/v1/attestations"
payload = {
"symbol": "AAPLon",
"tokenAmount": "5.000000000000000000",
"userAddress": "7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: 'AAPLon',
tokenAmount: '5.000000000000000000',
userAddress: '7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2'
})
};
fetch('https://api.gm.ondo.finance/v1/attestations', 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.gm.ondo.finance/v1/attestations",
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([
'symbol' => 'AAPLon',
'tokenAmount' => '5.000000000000000000',
'userAddress' => '7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.gm.ondo.finance/v1/attestations"
payload := strings.NewReader("{\n \"symbol\": \"AAPLon\",\n \"tokenAmount\": \"5.000000000000000000\",\n \"userAddress\": \"7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<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.gm.ondo.finance/v1/attestations")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"AAPLon\",\n \"tokenAmount\": \"5.000000000000000000\",\n \"userAddress\": \"7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gm.ondo.finance/v1/attestations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"AAPLon\",\n \"tokenAmount\": \"5.000000000000000000\",\n \"userAddress\": \"7YkSgYQ6x7uBv9E3n2Yh6mF5tQ1rZc8Lp4WsXjKd3Ha2\"\n}"
response = http.request(request)
puts response.read_body{
"attestationId": "229852750420835981756873903928305653446",
"userId": "0x474d0000000000009310097834e2c7af00000000000000000000000000000000",
"chainId": "1",
"symbol": "AAPLon",
"ticker": "AAPL",
"assetAddress": "0x14c3abf95cb9c93a8b82c1cdcb76d72cb87b2d4c",
"side": "0",
"tokenAmount": "5000000000000000000",
"price": "225273151158540753535",
"expiration": 1746655938,
"signature": "kMecIrsGFdoAdxzRq2bPo07FWP2QyrxWfjrSMAdIZXNq3bXQnWx27aTKyt9fJiXWrzShYemxA/0RengNqNJ6bBs=",
"additionalData": ""
}Body
application/json
Request a mint or redeem attestation.
- AttestationByTokenAmountRequest
- AttestationByNotionalValueRequest
Request to mint or redeem a quantity of assets.
Response
OK

