curl --request POST \
--url https://api-uat.dimetrades.com/api/wallet/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"amount": 50
}'import requests
url = "https://api-uat.dimetrades.com/api/wallet/withdraw"
payload = { "amount": 50 }
headers = {
"Authorization": "Bearer <token>",
"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: {
Authorization: 'Bearer <token>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 50})
};
fetch('https://api-uat.dimetrades.com/api/wallet/withdraw', 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-uat.dimetrades.com/api/wallet/withdraw",
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([
'amount' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-uat.dimetrades.com/api/wallet/withdraw"
payload := strings.NewReader("{\n \"amount\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-uat.dimetrades.com/api/wallet/withdraw")
.header("Authorization", "Bearer <token>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-uat.dimetrades.com/api/wallet/withdraw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 50\n}"
response = http.request(request)
puts response.read_body{
"data": {
"success": true,
"status": "pending",
"txnId": "019f2e00-2222-733c-b8af-abcdef012345",
"amountCents": 5000,
"message": "Withdrawal request accepted; it will be confirmed shortly."
},
"errors": []
}Withdraw funds
Initiates a withdrawal from the authenticated user’s wallet. Accepted as pending and confirmed asynchronously. Requires a KYC-verified account and is geo-blocked in restricted jurisdictions. Withdrawable amount is limited to the available (non-locked) balance.
⚠️ Dollars in, cents out
You send amount in dollars. The acknowledgement echoes amountCents
in integer cents — Math.round(amount × 100), the value actually handed
to the matching engine.
| Field | Unit | Example | |
|---|---|---|---|
| Request | amount | dollars | 50.00 |
| Response | amountCents | cents | 5000 |
They are the same money in different units. Do not compare them directly,
and never feed amountCents back in as amount — that would request 100×
the intended amount. Send at most 2 decimal places; a third is rounded away.
amount is checked against availableBalance from GET /wallet/balance,
which is also in dollars, so the two compare directly. See
Conventions → Money and units.
curl --request POST \
--url https://api-uat.dimetrades.com/api/wallet/withdraw \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '{
"amount": 50
}'import requests
url = "https://api-uat.dimetrades.com/api/wallet/withdraw"
payload = { "amount": 50 }
headers = {
"Authorization": "Bearer <token>",
"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: {
Authorization: 'Bearer <token>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({amount: 50})
};
fetch('https://api-uat.dimetrades.com/api/wallet/withdraw', 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-uat.dimetrades.com/api/wallet/withdraw",
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([
'amount' => 50
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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-uat.dimetrades.com/api/wallet/withdraw"
payload := strings.NewReader("{\n \"amount\": 50\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-uat.dimetrades.com/api/wallet/withdraw")
.header("Authorization", "Bearer <token>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-uat.dimetrades.com/api/wallet/withdraw")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 50\n}"
response = http.request(request)
puts response.read_body{
"data": {
"success": true,
"status": "pending",
"txnId": "019f2e00-2222-733c-b8af-abcdef012345",
"amountCents": 5000,
"message": "Withdrawal request accepted; it will be confirmed shortly."
},
"errors": []
}Authorizations
The end user's JWT access token, sent as Authorization: Bearer <token>.
Obtain one from POST /partner/customers or POST /partner/customers/login
— both return it as token. It identifies which of your users a call
is made for, and is sent alongside your X-API-Key on every authenticated
endpoint.
Event discovery, categories, subcategories and scores are public and need no token.
ISV / partner credential — public half. Required on every request.
Identifies the integration partner (ISV) making the call. Issued by Dime
Trades when the ISV is onboarded and sent on every /partner/* endpoint:
X-API-Key: dt_pk_live_7f3c9a2e5b18
- On the two partner endpoints that create accounts or issue tokens (
POST /partner/customers,POST /partner/customers/login), it is accompanied byX-API-Secretand is the only authentication — there is no user token yet. - On every other partner endpoint it is sent alongside the user's
Authorization: Bearer <token>: the API key says which platform is calling, the bearer token says which user it is calling for.
Credentials are scoped to one or more brands; using a key with a brandId outside that scope returns 403. Staging and production keys are separate.
The key identifies your platform — treat it as a backend credential.
Body
Amount to withdraw in dollars (USD), max 2 decimal places — 50 is $50.00. Not cents. Compared directly against availableBalance, which is also in dollars. The response echoes the same figure as amountCents.
50
Response
Withdrawal accepted (pending).
Acknowledgement returned by POST /wallet/deposit and POST /wallet/withdraw (DepositFundsService / WithdrawFundsService). Both publish a wallet event to Kafka and return pending — the matching engine settles it and the ledger consumer persists the balance change asynchronously; this response never reflects the confirmed balance.
Units differ between request and response. You send amount in dollars; this acknowledgement echoes amountCents in integer cents (amount × 100, rounded). They are the same money in different units — do not compare them, and do not feed amountCents back in as amount. See Conventions → Money and units.
Show child attributes
Show child attributes
