curl --request POST \
--url https://api.tetrafi.io/api/v1/orders/{id}/cancel \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tetrafi.io/api/v1/orders/{id}/cancel"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tetrafi.io/api/v1/orders/{id}/cancel', 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.tetrafi.io/api/v1/orders/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.tetrafi.io/api/v1/orders/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.tetrafi.io/api/v1/orders/{id}/cancel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tetrafi.io/api/v1/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deliverTo": {
"accountKind": "venueAccount",
"displayName": "<string>",
"financialAccountId": "<string>",
"isDefault": true,
"kind": "financialAccount",
"network": "eip155:8453"
},
"fundingAccount": {
"financialAccountId": "<string>",
"kind": "venueAccount",
"linkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"fundingModel": "prefunded",
"settlement": {
"method": "venueLedger",
"timing": "immediate",
"window": {
"cadence": {
"dayBasis": "calendarDays",
"kind": "intraday",
"everyHours": 1,
"localTimes": [
"<string>"
]
},
"scheduleId": "<string>",
"scheduleLabel": "<string>",
"scheduleVersion": 123,
"snapshotAt": "2023-11-07T05:31:56Z",
"windowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assumedBoundary": {
"lpName": "<string>",
"source": "<string>",
"timeZone": "<string>"
},
"cutoffAt": "2023-11-07T05:31:56Z",
"paymentDeadlineAt": "2023-11-07T05:31:56Z",
"settlementBasis": "clock",
"settlesBy": "2023-11-07T05:31:56Z",
"statementIssuer": "<string>"
}
},
"tradingSource": {
"financialAccountId": "<string>",
"kind": "venueAccount",
"venueEnablementId": "<string>"
},
"fees": [
{
"amount": "<string>",
"asset": "<string>",
"includedInPrice": true,
"kind": "trading",
"chain": "<string>"
}
],
"fills": [
{
"amount": "<string>",
"at": "2023-11-07T05:31:56Z",
"price": {
"amount": "<string>",
"base": "<string>",
"quote": "<string>"
},
"sellAmount": "<string>",
"venue": {
"id": "<string>",
"name": "<string>"
},
"network": "<string>",
"txHash": "<string>"
}
],
"quotedBuyAmount": "<string>",
"settledBuyAmount": "<string>",
"settlesBy": "2023-11-07T05:31:56Z",
"unrecordedFees": [
"trading"
],
"order": {
"createdAt": "2023-11-07T05:31:56Z",
"orderId": "<string>",
"orderType": "<string>",
"settlement": {
"data": "<unknown>",
"type": "escrow"
},
"status": "created",
"terminal": true,
"updatedAt": "2023-11-07T05:31:56Z",
"bondReservation": {
"amount": "<string>",
"status": "pending",
"assetSymbol": "<string>",
"chainId": 1,
"decimals": 1,
"paidAmount": "<string>",
"reason": "crossVmCarrier",
"txHash": "<string>"
},
"compliance": {
"checks": [
{
"enforced": true,
"group": "applied",
"groupReason": "<string>",
"id": "<string>",
"label": "<string>",
"layer": "onChain",
"runMode": "enforce",
"source": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"verdict": "pass",
"chainId": 1,
"contractAddress": "<string>",
"details": "<string>",
"evidence": "<unknown>",
"latencyMs": 123,
"missingInput": "<string>",
"reasonCode": "<string>",
"runModeReason": "<string>",
"txHash": "<string>"
}
],
"travelRule": {
"required": true,
"status": "<string>",
"transmitted": true
},
"verdict": "pass",
"attestation": {
"onChainAttested": true,
"expiresAt": "2023-11-07T05:31:56Z",
"jurisdiction": "<string>",
"onChainTxHash": "<string>",
"tier": 123,
"vendorHash": "<string>"
},
"corridor": "<string>",
"denial": {
"code": "<string>",
"remedy": "verifyIdentity",
"withheld": true,
"fields": [
"<string>"
]
},
"denialReason": "<string>",
"evaluatedAt": "2023-11-07T05:31:56Z",
"notionalUsd": 123,
"onChainPolicy": {
"openRuns": 1,
"runs": [
{
"chainId": 1,
"enforced": true,
"engineAddress": "<string>",
"gate": {
"gate": "enforced",
"policies": 1
},
"selector": "<string>",
"targetAddress": "<string>",
"transactionHash": "<string>",
"blockNumber": 1,
"blockTime": "2023-11-07T05:31:56Z"
}
],
"state": "policyRun",
"unknownRuns": 1
},
"scope": "full",
"walletIdentity": {
"address": "<string>",
"method": "<string>",
"chainFamily": "<string>",
"linkedAt": "2023-11-07T05:31:56Z"
}
},
"continuationPlan": {
"legs": [
{
"legIndex": 1,
"mode": "atomic",
"slippageBps": 1,
"delegation": {
"grantId": "<string>",
"status": "preparing",
"refusal": "GRANT_NOT_FOUND"
},
"etaSeconds": 1,
"minimumOutput": "<string>",
"onFailure": {
"funds": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"holder": "yourWallet",
"address": "<string>"
},
"referenceOutput": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
}
}
]
},
"custodySigningError": "<string>",
"custodySigningStatus": "<string>",
"custodyVaultAddress": "<string>",
"deliveredBuy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"deliveredBuyProvenance": "<string>",
"directUserId": "<string>",
"executionDeadlineAt": "2023-11-07T05:31:56Z",
"executionDeadlineKind": "<string>",
"failure": {
"code": "<string>",
"message": "<string>",
"phase": "prepare",
"recoveryStopped": true
},
"feeOutputs": [
{
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
}
],
"feeUsd": 123,
"fillTransaction": "<unknown>",
"filledAt": "2023-11-07T05:31:56Z",
"legAttempts": {},
"legs": [
{
"buy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"index": 1,
"kind": "<string>",
"label": "<string>",
"sell": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"status": "<string>",
"counterparty": {
"counterpartyType": "<string>",
"jurisdiction": "<string>",
"kybStatus": "<string>",
"licences": [
{
"jurisdiction": "<string>",
"licenceType": "<string>",
"status": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
],
"provenance": "kybVerified"
},
"destChainId": 1,
"etaSeconds": 1,
"externalRefs": [
{
"kind": "<string>",
"value": "<string>",
"url": "<string>"
}
],
"feeUsd": 123,
"measuredBuy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"measuredBuySource": "<string>",
"product": "<string>",
"provider": "<string>",
"sourceChainId": 1,
"tradeLeg": {
"direction": "pay_in",
"legId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settlementRail": "bank",
"state": "planned",
"boundLapsesAt": "2023-11-07T05:31:56Z",
"confirmAgainReason": "priceBeyondBound",
"consentedPayoutFee": "<string>",
"creditedAmount": "<string>",
"currentPayoutFee": "<string>",
"declaredPayoutFee": "<string>",
"destination": {
"kind": "wallet",
"ref": "<string>",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"expectedArrivalAt": "2023-11-07T05:31:56Z",
"expectedArrivalSource": "<string>",
"finality": "final",
"fundingDeadlineAt": "2023-11-07T05:31:56Z",
"fundingModel": "prefunded",
"fundsReceivedAt": "2023-11-07T05:31:56Z",
"holidaysApplied": true,
"outcomeCode": "<string>",
"overdueAt": "2023-11-07T05:31:56Z",
"overdueSince": "2023-11-07T05:31:56Z",
"ownBankVerification": {
"source": "revolutBusiness",
"state": "verified",
"credit": {
"amount": "<string>",
"creditedAt": "2023-11-07T05:31:56Z",
"currency": "<string>",
"referenceMasked": "<string>"
},
"lastGoodReadAt": "2023-11-07T05:31:56Z",
"matchedBy": "referenceAndAmount",
"reason": "<string>",
"reviewItemId": "<string>"
},
"payoutApproval": {
"approvalsRequired": 1,
"approverNames": [
"<string>"
],
"approvalRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approverGroup": "<string>",
"approverGroupName": "<string>",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payoutBreakdown": {
"basis": "consent",
"fee": "<string>",
"receivedMax": "<string>",
"receivedMin": "<string>",
"withdrawn": "<string>",
"charging": "deducted"
},
"payoutBreakdownUnavailableReason": "<string>",
"payoutHeldReason": "<string>",
"quotedExpectedArrivalAt": "2023-11-07T05:31:56Z",
"rail": "<string>",
"railOption": "standard",
"railReference": {
"state": "not_reported_yet"
},
"recipientConfirmation": {
"confirmationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmedAt": "2023-11-07T05:31:56Z",
"confirmedBy": "<string>",
"confirmedByName": "<string>",
"legId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"returnWindowEndsAt": "2023-11-07T05:31:56Z",
"returnedAfterSettlement": {
"detectedAt": "2023-11-07T05:31:56Z",
"reviewItemId": "<string>"
},
"returnedTo": "lpAccount",
"reviewAt": "2023-11-07T05:31:56Z",
"reviewEnteredAt": "2023-11-07T05:31:56Z",
"reviewItemId": "<string>",
"reviewReason": "uncertain_send",
"submittedAt": "2023-11-07T05:31:56Z",
"transactionHash": "<string>",
"venueReportedCredited": true,
"venueWithdrawalId": "<string>"
},
"transactions": [
{
"actor": "user",
"chainId": 1,
"chainRole": "origin",
"hash": "<string>",
"stage": "prepare",
"status": "pending",
"explorerUrl": "<string>",
"label": "<string>",
"legIndex": 1,
"timestamp": 1
}
],
"venueRouteId": "<string>"
}
],
"lifecycleStatus": {
"bucket": "inProgress",
"flowKind": "<string>",
"isTerminal": true,
"primary": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
},
"rank": 1,
"rawStatus": "<string>",
"execution": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
},
"rawDeferredStatus": "<string>",
"settlement": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
},
"withdrawal": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
}
},
"linkedWalletId": "<string>",
"nextAction": {
"kind": "payoutFeeRose",
"legId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"nextActions": [
{
"purpose": "tokenApproval",
"type": "authorizeWallet",
"actor": "userWallet",
"after": [
"waitForTransactionMined"
],
"chain": {
"namespace": "eip155",
"reference": "<string>"
},
"chainId": 1,
"details": "<unknown>",
"frequency": "perTrade",
"sourceAuthorizationMessage": {
"deadline": 1,
"encoding": "base64",
"message": "<string>",
"nonce": "<string>",
"scheme": "svmSourcePermit",
"signer": "<string>"
},
"submitTo": "<string>",
"transaction": {
"data": "<string>",
"kind": "evm",
"to": "<string>",
"value": "<string>"
},
"tx": {
"data": "<string>",
"to": "<string>",
"value": "<string>"
},
"typedData": "<unknown>",
"walletAuthorization": {
"authorizationKind": "turnkeyOwnerProof",
"authorizationPayload": "<unknown>",
"expiresAt": "2023-11-07T05:31:56Z",
"provider": "privy",
"signingDigest": "<string>",
"walletId": "<string>",
"authorizationId": "<string>",
"providerBody": "<string>",
"requestExpiryMs": 123
}
}
],
"nextActor": "taker",
"orderKind": "<string>",
"pairQuoteId": "<string>",
"quoteId": "<string>",
"realizedSlippageBps": 123,
"recipientAddress": "<string>",
"reporting": {
"legs": [
{
"counterparty": {
"name": "<string>",
"status": "connected",
"workspaceId": "<string>"
},
"legId": "<string>",
"provider": "<string>",
"limitation": "<string>",
"reportingInstitution": {
"name": "<string>",
"status": "connected",
"workspaceId": "<string>"
}
}
],
"transfers": [
{
"createdAt": "2023-11-07T05:31:56Z",
"dataStatus": "<string>",
"id": "<string>",
"orderId": "<string>",
"state": "<string>",
"transmissionStatus": "<string>",
"viewerRole": "<string>",
"escalatedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>",
"nextRetryAt": "2023-11-07T05:31:56Z",
"piiSubmittedAt": "2023-11-07T05:31:56Z",
"providerCheckedAt": "2023-11-07T05:31:56Z",
"providerStatus": "<string>",
"providerTransferId": "<string>",
"receivingVaspDid": "<string>",
"reportingWorkspaceId": "<string>",
"sendingVaspDid": "<string>"
}
]
},
"route": {
"buy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"sell": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
}
},
"senderAddress": "<string>",
"settledAt": "2023-11-07T05:31:56Z",
"settlementSpeedMs": 123,
"slippageToleranceBps": 123,
"stuckSince": "2023-11-07T05:31:56Z",
"substatus": "<string>",
"substatusCode": "<string>",
"substatusMessage": "<string>",
"timing": {
"observedAt": "2023-11-07T05:31:56Z",
"revision": "<string>",
"stages": [
{
"clockState": "<string>",
"context": "<string>",
"estimateKind": "<string>",
"key": "<string>",
"operation": "<string>",
"elapsedSeconds": 123,
"endedAt": "2023-11-07T05:31:56Z",
"expectedSeconds": 1,
"legIndex": 1,
"startedAt": "2023-11-07T05:31:56Z",
"waitingSince": "2023-11-07T05:31:56Z"
}
]
},
"transactions": [
{
"actor": "user",
"chainId": 1,
"chainRole": "origin",
"hash": "<string>",
"stage": "prepare",
"status": "pending",
"explorerUrl": "<string>",
"label": "<string>",
"legIndex": 1,
"timestamp": 1
}
],
"venueRouteId": "<string>",
"viewer": {
"recordsScope": "full",
"submittedByYou": true
},
"workspaceId": "<string>"
},
"orderId": "<string>",
"status": "pending",
"statusUrl": "<string>",
"terminal": true,
"kind": "advancedTrade",
"creditCheck": {
"activeHolds": "<string>",
"available": "<string>",
"availableSigned": "<string>",
"checkedAt": "2023-11-07T05:31:56Z",
"creditPortion": {
"amount": "<string>",
"currency": "<string>",
"lineValue": "<string>"
},
"decision": "<string>",
"effectiveLimit": "<string>",
"exposureDelta": "<string>",
"exposureReducing": true,
"localHeadroom": "<string>",
"lpAvailable": "<string>",
"maxAgeMs": 1,
"observationAgeMs": 1,
"observationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectedUsed": "<string>",
"source": "<string>",
"termsVersion": 123,
"used": "<string>",
"valuationMaxAgeMs": 1,
"venueAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"journalVersion": "<string>",
"overLimitBy": {
"amount": "<string>",
"currency": "<string>",
"lineValue": "<string>"
},
"positionsBasis": "<string>",
"zeroAssets": [
"<string>"
]
},
"creditPortion": {
"amount": "<string>",
"currency": "<string>",
"lineValue": "<string>"
},
"creditReservation": {
"debitAsset": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"exposureAmount": "<string>",
"exposureCurrency": "<string>",
"inputAmount": "<string>",
"positiveInputAmount": "<string>",
"reservationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payIn": {
"afterPayBy": {
"action": "returned",
"source": "<string>"
},
"payBy": {
"clock": "payment_started",
"seconds": 1
},
"settlementGrace": {
"kind": "no_grace"
}
},
"next": {
"kind": "order"
},
"quoteId": "<string>",
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}Cancel an order before it is dispatched to a venue.
Cancels an undispatched Basic order or a pay-in still awaiting funds. Returns the same order envelope as GET, with status cancelled and terminal true. Repeating cancellation leaves the order unchanged. A durable dispatch claim, a progressed funding leg, or a terminal outcome refuses with ORDER_NOT_CANCELLABLE and details.status. Requires current PlaceOrder authority; API keys need orders_write and Idempotency-Key. No venue cancellation is attempted.
curl --request POST \
--url https://api.tetrafi.io/api/v1/orders/{id}/cancel \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tetrafi.io/api/v1/orders/{id}/cancel"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tetrafi.io/api/v1/orders/{id}/cancel', 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.tetrafi.io/api/v1/orders/{id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.tetrafi.io/api/v1/orders/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.tetrafi.io/api/v1/orders/{id}/cancel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tetrafi.io/api/v1/orders/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deliverTo": {
"accountKind": "venueAccount",
"displayName": "<string>",
"financialAccountId": "<string>",
"isDefault": true,
"kind": "financialAccount",
"network": "eip155:8453"
},
"fundingAccount": {
"financialAccountId": "<string>",
"kind": "venueAccount",
"linkId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"fundingModel": "prefunded",
"settlement": {
"method": "venueLedger",
"timing": "immediate",
"window": {
"cadence": {
"dayBasis": "calendarDays",
"kind": "intraday",
"everyHours": 1,
"localTimes": [
"<string>"
]
},
"scheduleId": "<string>",
"scheduleLabel": "<string>",
"scheduleVersion": 123,
"snapshotAt": "2023-11-07T05:31:56Z",
"windowId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assumedBoundary": {
"lpName": "<string>",
"source": "<string>",
"timeZone": "<string>"
},
"cutoffAt": "2023-11-07T05:31:56Z",
"paymentDeadlineAt": "2023-11-07T05:31:56Z",
"settlementBasis": "clock",
"settlesBy": "2023-11-07T05:31:56Z",
"statementIssuer": "<string>"
}
},
"tradingSource": {
"financialAccountId": "<string>",
"kind": "venueAccount",
"venueEnablementId": "<string>"
},
"fees": [
{
"amount": "<string>",
"asset": "<string>",
"includedInPrice": true,
"kind": "trading",
"chain": "<string>"
}
],
"fills": [
{
"amount": "<string>",
"at": "2023-11-07T05:31:56Z",
"price": {
"amount": "<string>",
"base": "<string>",
"quote": "<string>"
},
"sellAmount": "<string>",
"venue": {
"id": "<string>",
"name": "<string>"
},
"network": "<string>",
"txHash": "<string>"
}
],
"quotedBuyAmount": "<string>",
"settledBuyAmount": "<string>",
"settlesBy": "2023-11-07T05:31:56Z",
"unrecordedFees": [
"trading"
],
"order": {
"createdAt": "2023-11-07T05:31:56Z",
"orderId": "<string>",
"orderType": "<string>",
"settlement": {
"data": "<unknown>",
"type": "escrow"
},
"status": "created",
"terminal": true,
"updatedAt": "2023-11-07T05:31:56Z",
"bondReservation": {
"amount": "<string>",
"status": "pending",
"assetSymbol": "<string>",
"chainId": 1,
"decimals": 1,
"paidAmount": "<string>",
"reason": "crossVmCarrier",
"txHash": "<string>"
},
"compliance": {
"checks": [
{
"enforced": true,
"group": "applied",
"groupReason": "<string>",
"id": "<string>",
"label": "<string>",
"layer": "onChain",
"runMode": "enforce",
"source": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"verdict": "pass",
"chainId": 1,
"contractAddress": "<string>",
"details": "<string>",
"evidence": "<unknown>",
"latencyMs": 123,
"missingInput": "<string>",
"reasonCode": "<string>",
"runModeReason": "<string>",
"txHash": "<string>"
}
],
"travelRule": {
"required": true,
"status": "<string>",
"transmitted": true
},
"verdict": "pass",
"attestation": {
"onChainAttested": true,
"expiresAt": "2023-11-07T05:31:56Z",
"jurisdiction": "<string>",
"onChainTxHash": "<string>",
"tier": 123,
"vendorHash": "<string>"
},
"corridor": "<string>",
"denial": {
"code": "<string>",
"remedy": "verifyIdentity",
"withheld": true,
"fields": [
"<string>"
]
},
"denialReason": "<string>",
"evaluatedAt": "2023-11-07T05:31:56Z",
"notionalUsd": 123,
"onChainPolicy": {
"openRuns": 1,
"runs": [
{
"chainId": 1,
"enforced": true,
"engineAddress": "<string>",
"gate": {
"gate": "enforced",
"policies": 1
},
"selector": "<string>",
"targetAddress": "<string>",
"transactionHash": "<string>",
"blockNumber": 1,
"blockTime": "2023-11-07T05:31:56Z"
}
],
"state": "policyRun",
"unknownRuns": 1
},
"scope": "full",
"walletIdentity": {
"address": "<string>",
"method": "<string>",
"chainFamily": "<string>",
"linkedAt": "2023-11-07T05:31:56Z"
}
},
"continuationPlan": {
"legs": [
{
"legIndex": 1,
"mode": "atomic",
"slippageBps": 1,
"delegation": {
"grantId": "<string>",
"status": "preparing",
"refusal": "GRANT_NOT_FOUND"
},
"etaSeconds": 1,
"minimumOutput": "<string>",
"onFailure": {
"funds": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"holder": "yourWallet",
"address": "<string>"
},
"referenceOutput": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
}
}
]
},
"custodySigningError": "<string>",
"custodySigningStatus": "<string>",
"custodyVaultAddress": "<string>",
"deliveredBuy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"deliveredBuyProvenance": "<string>",
"directUserId": "<string>",
"executionDeadlineAt": "2023-11-07T05:31:56Z",
"executionDeadlineKind": "<string>",
"failure": {
"code": "<string>",
"message": "<string>",
"phase": "prepare",
"recoveryStopped": true
},
"feeOutputs": [
{
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
}
],
"feeUsd": 123,
"fillTransaction": "<unknown>",
"filledAt": "2023-11-07T05:31:56Z",
"legAttempts": {},
"legs": [
{
"buy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"index": 1,
"kind": "<string>",
"label": "<string>",
"sell": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"status": "<string>",
"counterparty": {
"counterpartyType": "<string>",
"jurisdiction": "<string>",
"kybStatus": "<string>",
"licences": [
{
"jurisdiction": "<string>",
"licenceType": "<string>",
"status": "<string>",
"expiresAt": "2023-11-07T05:31:56Z"
}
],
"provenance": "kybVerified"
},
"destChainId": 1,
"etaSeconds": 1,
"externalRefs": [
{
"kind": "<string>",
"value": "<string>",
"url": "<string>"
}
],
"feeUsd": 123,
"measuredBuy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"measuredBuySource": "<string>",
"product": "<string>",
"provider": "<string>",
"sourceChainId": 1,
"tradeLeg": {
"direction": "pay_in",
"legId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settlementRail": "bank",
"state": "planned",
"boundLapsesAt": "2023-11-07T05:31:56Z",
"confirmAgainReason": "priceBeyondBound",
"consentedPayoutFee": "<string>",
"creditedAmount": "<string>",
"currentPayoutFee": "<string>",
"declaredPayoutFee": "<string>",
"destination": {
"kind": "wallet",
"ref": "<string>",
"approvalId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"expectedArrivalAt": "2023-11-07T05:31:56Z",
"expectedArrivalSource": "<string>",
"finality": "final",
"fundingDeadlineAt": "2023-11-07T05:31:56Z",
"fundingModel": "prefunded",
"fundsReceivedAt": "2023-11-07T05:31:56Z",
"holidaysApplied": true,
"outcomeCode": "<string>",
"overdueAt": "2023-11-07T05:31:56Z",
"overdueSince": "2023-11-07T05:31:56Z",
"ownBankVerification": {
"source": "revolutBusiness",
"state": "verified",
"credit": {
"amount": "<string>",
"creditedAt": "2023-11-07T05:31:56Z",
"currency": "<string>",
"referenceMasked": "<string>"
},
"lastGoodReadAt": "2023-11-07T05:31:56Z",
"matchedBy": "referenceAndAmount",
"reason": "<string>",
"reviewItemId": "<string>"
},
"payoutApproval": {
"approvalsRequired": 1,
"approverNames": [
"<string>"
],
"approvalRequestId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approverGroup": "<string>",
"approverGroupName": "<string>",
"runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payoutBreakdown": {
"basis": "consent",
"fee": "<string>",
"receivedMax": "<string>",
"receivedMin": "<string>",
"withdrawn": "<string>",
"charging": "deducted"
},
"payoutBreakdownUnavailableReason": "<string>",
"payoutHeldReason": "<string>",
"quotedExpectedArrivalAt": "2023-11-07T05:31:56Z",
"rail": "<string>",
"railOption": "standard",
"railReference": {
"state": "not_reported_yet"
},
"recipientConfirmation": {
"confirmationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"confirmedAt": "2023-11-07T05:31:56Z",
"confirmedBy": "<string>",
"confirmedByName": "<string>",
"legId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"returnWindowEndsAt": "2023-11-07T05:31:56Z",
"returnedAfterSettlement": {
"detectedAt": "2023-11-07T05:31:56Z",
"reviewItemId": "<string>"
},
"returnedTo": "lpAccount",
"reviewAt": "2023-11-07T05:31:56Z",
"reviewEnteredAt": "2023-11-07T05:31:56Z",
"reviewItemId": "<string>",
"reviewReason": "uncertain_send",
"submittedAt": "2023-11-07T05:31:56Z",
"transactionHash": "<string>",
"venueReportedCredited": true,
"venueWithdrawalId": "<string>"
},
"transactions": [
{
"actor": "user",
"chainId": 1,
"chainRole": "origin",
"hash": "<string>",
"stage": "prepare",
"status": "pending",
"explorerUrl": "<string>",
"label": "<string>",
"legIndex": 1,
"timestamp": 1
}
],
"venueRouteId": "<string>"
}
],
"lifecycleStatus": {
"bucket": "inProgress",
"flowKind": "<string>",
"isTerminal": true,
"primary": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
},
"rank": 1,
"rawStatus": "<string>",
"execution": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
},
"rawDeferredStatus": "<string>",
"settlement": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
},
"withdrawal": {
"key": "<string>",
"label": "<string>",
"tone": "<string>"
}
},
"linkedWalletId": "<string>",
"nextAction": {
"kind": "payoutFeeRose",
"legId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"nextActions": [
{
"purpose": "tokenApproval",
"type": "authorizeWallet",
"actor": "userWallet",
"after": [
"waitForTransactionMined"
],
"chain": {
"namespace": "eip155",
"reference": "<string>"
},
"chainId": 1,
"details": "<unknown>",
"frequency": "perTrade",
"sourceAuthorizationMessage": {
"deadline": 1,
"encoding": "base64",
"message": "<string>",
"nonce": "<string>",
"scheme": "svmSourcePermit",
"signer": "<string>"
},
"submitTo": "<string>",
"transaction": {
"data": "<string>",
"kind": "evm",
"to": "<string>",
"value": "<string>"
},
"tx": {
"data": "<string>",
"to": "<string>",
"value": "<string>"
},
"typedData": "<unknown>",
"walletAuthorization": {
"authorizationKind": "turnkeyOwnerProof",
"authorizationPayload": "<unknown>",
"expiresAt": "2023-11-07T05:31:56Z",
"provider": "privy",
"signingDigest": "<string>",
"walletId": "<string>",
"authorizationId": "<string>",
"providerBody": "<string>",
"requestExpiryMs": 123
}
}
],
"nextActor": "taker",
"orderKind": "<string>",
"pairQuoteId": "<string>",
"quoteId": "<string>",
"realizedSlippageBps": 123,
"recipientAddress": "<string>",
"reporting": {
"legs": [
{
"counterparty": {
"name": "<string>",
"status": "connected",
"workspaceId": "<string>"
},
"legId": "<string>",
"provider": "<string>",
"limitation": "<string>",
"reportingInstitution": {
"name": "<string>",
"status": "connected",
"workspaceId": "<string>"
}
}
],
"transfers": [
{
"createdAt": "2023-11-07T05:31:56Z",
"dataStatus": "<string>",
"id": "<string>",
"orderId": "<string>",
"state": "<string>",
"transmissionStatus": "<string>",
"viewerRole": "<string>",
"escalatedAt": "2023-11-07T05:31:56Z",
"lastError": "<string>",
"nextRetryAt": "2023-11-07T05:31:56Z",
"piiSubmittedAt": "2023-11-07T05:31:56Z",
"providerCheckedAt": "2023-11-07T05:31:56Z",
"providerStatus": "<string>",
"providerTransferId": "<string>",
"receivingVaspDid": "<string>",
"reportingWorkspaceId": "<string>",
"sendingVaspDid": "<string>"
}
]
},
"route": {
"buy": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
},
"sell": {
"asset": {
"assetId": "<string>",
"resolutionStatus": "resolved",
"symbol": "<string>",
"address": "<string>",
"chainId": 1,
"chainRef": "<string>",
"decimals": 1,
"name": "<string>"
},
"decimalAmount": "<string>",
"rawAmount": "<string>",
"unresolved": "assetNotInRegistry"
}
},
"senderAddress": "<string>",
"settledAt": "2023-11-07T05:31:56Z",
"settlementSpeedMs": 123,
"slippageToleranceBps": 123,
"stuckSince": "2023-11-07T05:31:56Z",
"substatus": "<string>",
"substatusCode": "<string>",
"substatusMessage": "<string>",
"timing": {
"observedAt": "2023-11-07T05:31:56Z",
"revision": "<string>",
"stages": [
{
"clockState": "<string>",
"context": "<string>",
"estimateKind": "<string>",
"key": "<string>",
"operation": "<string>",
"elapsedSeconds": 123,
"endedAt": "2023-11-07T05:31:56Z",
"expectedSeconds": 1,
"legIndex": 1,
"startedAt": "2023-11-07T05:31:56Z",
"waitingSince": "2023-11-07T05:31:56Z"
}
]
},
"transactions": [
{
"actor": "user",
"chainId": 1,
"chainRole": "origin",
"hash": "<string>",
"stage": "prepare",
"status": "pending",
"explorerUrl": "<string>",
"label": "<string>",
"legIndex": 1,
"timestamp": 1
}
],
"venueRouteId": "<string>",
"viewer": {
"recordsScope": "full",
"submittedByYou": true
},
"workspaceId": "<string>"
},
"orderId": "<string>",
"status": "pending",
"statusUrl": "<string>",
"terminal": true,
"kind": "advancedTrade",
"creditCheck": {
"activeHolds": "<string>",
"available": "<string>",
"availableSigned": "<string>",
"checkedAt": "2023-11-07T05:31:56Z",
"creditPortion": {
"amount": "<string>",
"currency": "<string>",
"lineValue": "<string>"
},
"decision": "<string>",
"effectiveLimit": "<string>",
"exposureDelta": "<string>",
"exposureReducing": true,
"localHeadroom": "<string>",
"lpAvailable": "<string>",
"maxAgeMs": 1,
"observationAgeMs": 1,
"observationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectedUsed": "<string>",
"source": "<string>",
"termsVersion": 123,
"used": "<string>",
"valuationMaxAgeMs": 1,
"venueAccountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"journalVersion": "<string>",
"overLimitBy": {
"amount": "<string>",
"currency": "<string>",
"lineValue": "<string>"
},
"positionsBasis": "<string>",
"zeroAssets": [
"<string>"
]
},
"creditPortion": {
"amount": "<string>",
"currency": "<string>",
"lineValue": "<string>"
},
"creditReservation": {
"debitAsset": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"exposureAmount": "<string>",
"exposureCurrency": "<string>",
"inputAmount": "<string>",
"positiveInputAmount": "<string>",
"reservationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"state": "<string>",
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"payIn": {
"afterPayBy": {
"action": "returned",
"source": "<string>"
},
"payBy": {
"clock": "payment_started",
"seconds": 1
},
"settlementGrace": {
"kind": "no_grace"
}
},
"next": {
"kind": "order"
},
"quoteId": "<string>",
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}{
"docUrl": "<string>",
"error": "<string>",
"message": "<string>",
"retryable": true,
"timestamp": 123,
"details": {
"capabilityBlockers": [
{
"code": "WORKSPACE_NOT_FOUND",
"estimate": "minutes",
"message": "<string>",
"unlockStep": "finish_onboarding",
"currentlyDue": [
"<string>"
]
}
],
"conflicts": [
"<string>"
],
"field": "<string>",
"reason": "<string>",
"remediation": "<string>",
"retryAfter": "PT120S",
"value": "<string>"
},
"next": {
"kind": "order"
},
"requestId": "<string>"
}Authorizations
Send the API key in X-API-Key.
Request signing. A key with signing enabled (POST /api/v1/workspaces/{workspaceId}/users/me/api-keys/{keyId}/signing, which returns the signing secret once) must also sign every request:
X-Timestamp: the current Unix time in seconds, within 300 seconds of the server clock.X-Signature: lower-case hex HMAC-SHA256 of the canonical string, keyed with the signing secret's 32 bytes (the secret is 64 hex characters; decode it first).
The canonical string is four lines joined by \n, with no trailing newline: the X-Timestamp value, the upper-case method, the path with its query exactly as sent (/api/v1/orders?limit=1), and the lower-case hex SHA-256 of the exact body bytes (the SHA-256 of an empty body when there is none).
A write's signature (POST, PUT, PATCH, DELETE) is accepted once: sending the same signed write again is refused, so a retry signs again. A read (GET, HEAD) changes nothing, so an identical signed read inside the window is admitted again and polling needs no nonce.
A signing refusal is a 401 AUTH_REQUIRED whose details.reason names the cause: SIGNATURE_REQUIRED (a header is missing), SIGNATURE_INVALID (a malformed header or a wrong signature), TIMESTAMP_OUT_OF_RANGE or SIGNATURE_REPLAYED.
Headers
The workspace the request acts in. An API key bound to a workspace implies it: omit the header, or send that same id (another id answers 403 WORKSPACE_SCOPE_MISMATCH). A member session must send it (400 MISSING_WORKSPACE without it).
Required for API keys. Cancellation is naturally idempotent by order id.
Path Parameters
The identifier accepted by GET /orders/{id}
Response
- Option 1
- Option 2
- Option 3
- Option 4
What POST /orders {quoteId} created, read from the owner that saves it: a
protocol order in orders, or a workspace venue trade (fiat included) in the venue
trade operations. Nothing is recorded twice.
New values may be added; treat unknown values as other.
A resolved destination includes observed presentation facts, unlike a request.
New values may be added; treat unknown values as other.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
What backs execution. A link id appears only when money moves through that link.
Show child attributes
Show child attributes
What backs execution. A venue declares prefunded or payIn; credit is derived per
trade (never declared or chosen): the trade creates or increases a negative position on the
venue account, and creditPortion names how much.
New values may be added; treat unknown values as other.
prefunded, payIn, credit The venue's declared terms and, for delayed timing, the account schedule's window.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
The exact source selected for a quote, retained through execution and recovery.
New values may be added; treat unknown values as other.
- Option 1
- Option 2
Show child attributes
Show child attributes
The fees actually charged, as recorded: the venue's own fee report, bridge fees, network
gas the order's wallet paid, and the platform fee. Never a quoted estimate. A fee whose
amount was not reported or could not be read is left out rather than shown as 0, and its
kind is listed in unrecordedFees.
Show child attributes
Show child attributes
Each confirmed fill, in execution order. Always present: empty before any fill is confirmed.
Show child attributes
Show child attributes
The buy amount the executed quote said would land. Null when it is not known (for example before a venue order is dispatched).
What actually landed, read from the fill or settlement evidence. Null until it is measured; never the quote carried forward and never 0 for unknown.
The latest time the order settles, or can no longer execute, under its recorded terms: the signed order's fill deadline, or, on a route, the latest fill deadline every leg commits to (Advanced); the last on-chain step's send-by time (an on-chain Basic swap). Null when no such term is recorded, for example a same-chain DEX swap, whose call carries no deadline.
Every fee kind the order incurs whose actual charge is not recorded or could not be
read: a venue fee taken inside the price without an amount, a bridge leg's fee, gas
the order's wallet spent without a readable receipt, a platform fee billed off the
order. Always present; empty only when every incurred charge is in fees. An absent
kind with no fees line means nothing of that kind was charged. Open set: clients
show an unknown kind generically.
What a fee paid for.
New values may be added; treat unknown values as other.
trading, relayer, forwarding, transfer, network, platform Response body for /api/v1/orders endpoint (order submission)
Show child attributes
Show child attributes
The identifier accepted by GET /api/v1/orders/{id}.
Open public lifecycle vocabulary shared by both order kinds. States may be
skipped; act on terminal, not on a particular sequence.
New values may be added; treat unknown values as other.
pending, working, filled, settled, unfilled, cancelled, failed, refunded, reviewRequired, outcomeUnknown, refused Where to read this order's status (GET). An API key needs the orders_read scope;
placing the order needed only orders_write.
New values may be added; treat unknown values as other.
advancedTrade The credit decision the funding was derived from: point-in-time evidence, never a
reservation or dispatch authority. Present exactly when creditPortion is.
Show child attributes
Show child attributes
A credit trade's exact credit portion: the part of the debit, in the debit asset, that
creates or increases a negative position (the rest is spent from positives). Present
exactly when fundingModel is credit.
Show child attributes
Show child attributes
The firm ask's combined cash and credit hold on a credit venue account, held until the quote expires or its order adopts it. Absent on indicative cards.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The one action the caller takes next; later legs run under the order.
New values may be added; treat unknown values as other.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
Show child attributes
Show child attributes