curl --request GET \
--url https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview \
--header 'Authorization: Bearer <token>' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>'import requests
url = "https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview"
headers = {
"x-signature": "<x-signature>",
"x-timestamp": "<x-timestamp>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
Authorization: 'Bearer <token>'
}
};
fetch('https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'GET',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
Authorization: 'Bearer <token>'
}
};
fetch('https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-signature", "<x-signature>")
req.Header.Add("x-timestamp", "<x-timestamp>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"requestedUsd": 123,
"grossBalanceUsd": 123,
"pendingFeesUsd": 123,
"slippageUsd": 123,
"dustRetainedUsd": 123,
"remainingRequiredUsd": 123,
"netPayoutUsd": 123,
"ledgerAvailableUsd": 123,
"feeDisclosure": "<string>",
"agentBalanceUsd": 123,
"stayingInOpenTradesUsd": 123,
"successFeeDueUsd": 123,
"remainingInAgentUsd": 123,
"successFeeRule": "<string>",
"depositedUsd": 123,
"realizedPnlUsd": 123,
"unrealizedPnlUsd": 123,
"netRealizedProfitUsd": 123,
"feeBaseUsd": 123,
"platformFeeUsd": 123,
"creatorFeeUsd": 123,
"netUserPayoutUsd": 123,
"venueFreeMarginUsd": 123
}
}Preview allocation withdraw payout
Gross − pending fees − slippage − dust − success fee = you receive. Success fee is 8% EchoZero + creator% of net realized profit only (max(0, equity − deposit)), never of principal. Query fullExit=true for the unsubscribe sheet; closeAllTrades=true for the close-all rows. Schema: McpPreviewAgentAllocationWithdrawResponseDto.
curl --request GET \
--url https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview \
--header 'Authorization: Bearer <token>' \
--header 'x-signature: <x-signature>' \
--header 'x-timestamp: <x-timestamp>'import requests
url = "https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview"
headers = {
"x-signature": "<x-signature>",
"x-timestamp": "<x-timestamp>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
Authorization: 'Bearer <token>'
}
};
fetch('https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'GET',
headers: {
'x-signature': '<x-signature>',
'x-timestamp': '<x-timestamp>',
Authorization: 'Bearer <token>'
}
};
fetch('https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://mcp.echozero.app/api/v1/users/me/subscriptions/{agentId}/allocation/withdraw/preview"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-signature", "<x-signature>")
req.Header.Add("x-timestamp", "<x-timestamp>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"requestedUsd": 123,
"grossBalanceUsd": 123,
"pendingFeesUsd": 123,
"slippageUsd": 123,
"dustRetainedUsd": 123,
"remainingRequiredUsd": 123,
"netPayoutUsd": 123,
"ledgerAvailableUsd": 123,
"feeDisclosure": "<string>",
"agentBalanceUsd": 123,
"stayingInOpenTradesUsd": 123,
"successFeeDueUsd": 123,
"remainingInAgentUsd": 123,
"successFeeRule": "<string>",
"depositedUsd": 123,
"realizedPnlUsd": 123,
"unrealizedPnlUsd": 123,
"netRealizedProfitUsd": 123,
"feeBaseUsd": 123,
"platformFeeUsd": 123,
"creatorFeeUsd": 123,
"netUserPayoutUsd": 123,
"venueFreeMarginUsd": 123
}
}Authorizations
User JWT access token issued by POST /api/auth/verify or POST /api/auth/social/verify. Routes that accept both auth modes declare api-key and bearer-jwt security schemes.
Headers
Required for API-key authenticated requests. HMAC-SHA256(secretKey, timestamp + METHOD + path + body) as lowercase hex. Omit only for JWT/OAuth session tokens or public routes.
Required with x-signature. Epoch milliseconds; rejected if drift exceeds 5 minutes. Omit only for JWT/OAuth session tokens or public routes.
Path Parameters
Query Parameters
USD amount to preview. Gross − pending fees − slippage − dust − success fee = you receive.
x >= 0.01When true, preview the close-all sheet (no staying-in-open-trades; full-exit fee). Default keep-open.
When true, preview the unsubscribe sheet: full idle equity (not amountUsd) and the entire outstanding success fee.