Skip to main content
GET
/
conversion
/
stablecoins
/
{id}
Get Stablecoin Conversion
curl --request GET \
  --url https://api.paxos.com/v2/conversion/stablecoins/{id} \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.paxos.com/v2/conversion/stablecoins/{id}"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.paxos.com/v2/conversion/stablecoins/{id}', 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.paxos.com/v2/conversion/stablecoins/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.paxos.com/v2/conversion/stablecoins/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.paxos.com/v2/conversion/stablecoins/{id}")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.paxos.com/v2/conversion/stablecoins/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "account_id": "00000000-0000-0000-0000-000000000000",
  "amount": "3",
  "created_at'": "2023-10-19T15:37:18.929305Z",
  "id": "8dbce0e0-510f-4edc-9249-15f8c6214569",
  "identity_id": "00000000-0000-0000-0000-000000000000",
  "metadata": {
    "skey": "svalue",
    "custom_key": "custom_value"
  },
  "profile_id": "b821ff88-fdb4-49ba-b30f-99c40f01fcfc",
  "ref_id": "refid-24d25de7f5bd47ab978cbbd428b74199",
  "source_asset": "USD",
  "status": "CREATED",
  "target_asset": "USDP",
  "updated_at": "2023-10-19T15:37:18.990343Z"
}
{
"type": "about:blank",
"title": "Forbidden",
"status": 403,
"detail": "insufficient scopes: found 'conversion:write_conversion_stablecoin', required one of '[conversion:read_conversion_stablecoin]'"
}
{
"detail": "conversion with id 0def57e8-c6bb-40dc-b2b8-69bb80440cc1 not found for customer with id 4eaffe58-df0e-4559-8dec-fdae231684e1",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
The Orchestrations API replaces this endpoint.New customers should use Get Orchestration instead. Existing customers should follow the migration guide.
OAuth Scope
conversion:read_conversion_stablecoin

Authorizations

Authorization
string
header
required

Paxos APIs use OAuth 2 with the client credentials grant flow.

Token URLs:

Learn more in the API credentials guide →

Path Parameters

id
string
required

System provided UUID for the conversion is provided in the Create Stablecoin Conversion response.

Response

A successful response.

id
string

System provided UUID for the conversion is provided in the Create Stablecoin Conversion response.

Required parameter for the Get Stablecoin Conversion request.

profile_id
string

The Profile associated with a conversion. Required in the Create Stablecoin Conversion request.

amount
string<decimal>

Asset amount to convert. Details.

source_asset
string

The asset to convert from. Details.

target_asset
string

The asset to convert to. Details.

status
string

The current status of the conversion. Details.

ref_id
string

Client provided, unique Reference ID included the Create Stablecoin Conversion request.

identity_id
string

The Identity ID associated with the user requesting the conversion. Required only for customers with 3rd-Party integrations.

account_id
string

The Account ID associated with the user requesting the conversion. Required only for customers with 3rd-Party integrations.

created_at
string<date-time>

The time at which the conversion was requested. See RFC3339 format, like 2006-01-02T15:04:05Z.

updated_at
string<date-time>

The time at which the conversion was last updated. RFC3339 format, like 2006-01-02T15:04:05Z.

settled_at
string<date-time>

The time at which the conversion was settled. Details. RFC3339 format, like 2006-01-02T15:04:05Z.

cancelled_at
string<date-time>

The time at which the conversion has been cancelled. Details. RFC3339 format, like 2006-01-02T15:04:05Z.

metadata
object

Optional client-specified stored metadata.

recipient_profile_id
string

For directed settlement, the receiving side profile_id.