Skip to main content
DELETE
/
conversion
/
stablecoins
/
{id}
Cancel Stablecoin Conversion
curl --request DELETE \
  --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.delete(url, headers=headers)

print(response.text)
const options = {method: 'DELETE', 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 => "DELETE",
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("DELETE", 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.delete("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::Delete.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "id": "e5ca4d90-dff1-488a-ac04-04540f776ae1",
  "profile_id": "c3680989-c04e-4000-9d96-8aca09eedee1",
  "amount": "11.1",
  "source_asset": "USD",
  "target_asset": "USDP",
  "status": "CANCELLED",
  "identity_id": "d6aee44c-c169-405d-b14e-d78818577531",
  "account_id": "47bb49d7-4e6c-43bf-9fd6-6ccd7d7f15d1",
  "created_at": "2023-10-19T21:21:46.497863Z",
  "updated_at": "2023-10-19T21:21:53.297594Z",
  "cancelled_at": "2023-10-19T21:21:53.297594Z"
}
{
"detail": "insufficient scopes: found \"conversion:read_conversion_stablecoin\" required one of \"[conversion:write_conversion_stablecoin]\"",
"status": 403,
"title": "Forbidden",
"type": "about:blank"
}
{
"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 the Orchestrations API instead. Existing customers should follow the migration guide.
OAuth Scope
conversion:write_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.