Withdraw hosted venue funds
curl --request POST \
--url https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"mode": "live",
"requestId": "<string>",
"amountRaw": "<string>",
"destinationAddress": "<string>"
}
'import requests
url = "https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals"
payload = {
"mode": "live",
"requestId": "<string>",
"amountRaw": "<string>",
"destinationAddress": "<string>"
}
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mode: 'live',
requestId: '<string>',
amountRaw: '<string>',
destinationAddress: '<string>'
})
};
fetch('https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals', 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.agg.market/users/me/venue-accounts/{venue}/withdrawals",
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([
'mode' => 'live',
'requestId' => '<string>',
'amountRaw' => '<string>',
'destinationAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <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.agg.market/users/me/venue-accounts/{venue}/withdrawals"
payload := strings.NewReader("{\n \"mode\": \"live\",\n \"requestId\": \"<string>\",\n \"amountRaw\": \"<string>\",\n \"destinationAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.agg.market/users/me/venue-accounts/{venue}/withdrawals")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"live\",\n \"requestId\": \"<string>\",\n \"amountRaw\": \"<string>\",\n \"destinationAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"live\",\n \"requestId\": \"<string>\",\n \"amountRaw\": \"<string>\",\n \"destinationAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"venue": "betdex",
"accountId": "<string>",
"environment": "sandbox",
"asset": "USDC",
"decimals": 6,
"network": "solana",
"amountRaw": "<string>",
"destinationAddress": "<string>",
"status": "processing",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": "<string>",
"venue": "betdex",
"accountId": "<string>",
"environment": "sandbox",
"asset": "USDC",
"decimals": 6,
"network": "solana",
"amountRaw": "<string>",
"destinationAddress": "<string>",
"status": "processing",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Users
Withdraw hosted venue funds
Submits one explicit-amount Solana USDC withdrawal under a caller-owned idempotency key. Agg durably records the exact request before dispatch. An ambiguous provider result is retained for manual review and is never automatically replayed.
POST
/
users
/
me
/
venue-accounts
/
{venue}
/
withdrawals
Withdraw hosted venue funds
curl --request POST \
--url https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-app-id: <api-key>' \
--data '
{
"mode": "live",
"requestId": "<string>",
"amountRaw": "<string>",
"destinationAddress": "<string>"
}
'import requests
url = "https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals"
payload = {
"mode": "live",
"requestId": "<string>",
"amountRaw": "<string>",
"destinationAddress": "<string>"
}
headers = {
"x-app-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-app-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
mode: 'live',
requestId: '<string>',
amountRaw: '<string>',
destinationAddress: '<string>'
})
};
fetch('https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals', 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.agg.market/users/me/venue-accounts/{venue}/withdrawals",
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([
'mode' => 'live',
'requestId' => '<string>',
'amountRaw' => '<string>',
'destinationAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-app-id: <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.agg.market/users/me/venue-accounts/{venue}/withdrawals"
payload := strings.NewReader("{\n \"mode\": \"live\",\n \"requestId\": \"<string>\",\n \"amountRaw\": \"<string>\",\n \"destinationAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-app-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.agg.market/users/me/venue-accounts/{venue}/withdrawals")
.header("x-app-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"live\",\n \"requestId\": \"<string>\",\n \"amountRaw\": \"<string>\",\n \"destinationAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agg.market/users/me/venue-accounts/{venue}/withdrawals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-app-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"live\",\n \"requestId\": \"<string>\",\n \"amountRaw\": \"<string>\",\n \"destinationAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"venue": "betdex",
"accountId": "<string>",
"environment": "sandbox",
"asset": "USDC",
"decimals": 6,
"network": "solana",
"amountRaw": "<string>",
"destinationAddress": "<string>",
"status": "processing",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"id": "<string>",
"venue": "betdex",
"accountId": "<string>",
"environment": "sandbox",
"asset": "USDC",
"decimals": 6,
"network": "solana",
"amountRaw": "<string>",
"destinationAddress": "<string>",
"status": "processing",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Your application ID. Required for all app-tier and user-tier routes.
JWT access token returned by POST /auth/verify. Required for user-tier routes.
Path Parameters
Body
application/json
Response
200
Available options:
betdex Available options:
sandbox, production Available options:
USDC Available options:
6 Available options:
solana Pattern:
^[1-9][0-9]{0,31}$Required string length:
32 - 44Pattern:
^[1-9A-HJ-NP-Za-km-z]+$Available options:
processing, confirmed, failed, flagged, review_required