curl --request POST \
--url https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios \
--header 'Content-Type: application/json' \
--data '
{
"marketId": "BTC-USD-PERP",
"strategyId": "macd-signal",
"days": 30,
"mode": "deposit",
"depositUsd": "1000.00"
}
'import requests
url = "https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios"
payload = {
"marketId": "BTC-USD-PERP",
"strategyId": "macd-signal",
"days": 30,
"mode": "deposit",
"depositUsd": "1000.00"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
marketId: 'BTC-USD-PERP',
strategyId: 'macd-signal',
days: 30,
mode: 'deposit',
depositUsd: '1000.00'
})
};
fetch('https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios', 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://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios",
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([
'marketId' => 'BTC-USD-PERP',
'strategyId' => 'macd-signal',
'days' => 30,
'mode' => 'deposit',
'depositUsd' => '1000.00'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios"
payload := strings.NewReader("{\n \"marketId\": \"BTC-USD-PERP\",\n \"strategyId\": \"macd-signal\",\n \"days\": 30,\n \"mode\": \"deposit\",\n \"depositUsd\": \"1000.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios")
.header("Content-Type", "application/json")
.body("{\n \"marketId\": \"BTC-USD-PERP\",\n \"strategyId\": \"macd-signal\",\n \"days\": 30,\n \"mode\": \"deposit\",\n \"depositUsd\": \"1000.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"marketId\": \"BTC-USD-PERP\",\n \"strategyId\": \"macd-signal\",\n \"days\": 30,\n \"mode\": \"deposit\",\n \"depositUsd\": \"1000.00\"\n}"
response = http.request(request)
puts response.read_body{
"version": "agent-money-scenario/v1",
"status": "estimated",
"reason": "history_unavailable",
"message": "<string>",
"marketId": "<string>",
"strategyId": "<string>",
"mode": "deposit",
"days": 45,
"depositUsd": "<string>",
"targetProfitUsd": "<string>",
"estimatedNetProfitUsd": "<string>",
"rangeUsd": {
"lower": "<string>",
"upper": "<string>"
},
"basis": {
"candleSeries": "trade",
"fromEpochMs": 1,
"toEpochMs": 123,
"historicalClosedTrades": 1,
"sampledHistoricalDays": 60,
"bootstrapResamples": 1000,
"bookObservedAtEpochMs": 1,
"bookSnapshotSequence": 1,
"marketDataAsOfEpochMs": 1,
"takerFeeBps": 1,
"buyBookCostBps": 1,
"sellBookCostBps": 1,
"fundingRateBps": "<string>",
"fundingIntervalMs": 1,
"leverageX": 1
},
"label": "Estimate from Edel market data, not a promise"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}Estimate net profit or required deposit for one strategy and market
Uses cached closed trades from Edel’s last 30 to 90 days of 1h candles (basis.sampledHistoricalDays) and current engine book depth, market taker fees, and current funding as explicit future-cost assumptions. Funding is charged as a cost for both long and short positions. Deposit mode estimates net profit and a 10th to 90th percentile range over 1 to 90 days; target_profit mode finds the deposit for a target estimated net profit. A requested scenario reads current market data but never starts a backtest, trade, or provider call. Missing or stale inputs return a plain unavailable result. The book observation time is the API retrieval time, not a source event timestamp; historical funding rates are unavailable. Estimate from Edel market data, not a promise.
Method and path: POST /v1/agents/strategy-estimate-scenarios
Authentication: none.
Request schema: AgentMoneyScenarioRequest.
Response schema: AgentMoneyScenarioResponse.
Error envelope: ExternalRestError (external-rest-error/v1).
curl --request POST \
--url https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios \
--header 'Content-Type: application/json' \
--data '
{
"marketId": "BTC-USD-PERP",
"strategyId": "macd-signal",
"days": 30,
"mode": "deposit",
"depositUsd": "1000.00"
}
'import requests
url = "https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios"
payload = {
"marketId": "BTC-USD-PERP",
"strategyId": "macd-signal",
"days": 30,
"mode": "deposit",
"depositUsd": "1000.00"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
marketId: 'BTC-USD-PERP',
strategyId: 'macd-signal',
days: 30,
mode: 'deposit',
depositUsd: '1000.00'
})
};
fetch('https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios', 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://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios",
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([
'marketId' => 'BTC-USD-PERP',
'strategyId' => 'macd-signal',
'days' => 30,
'mode' => 'deposit',
'depositUsd' => '1000.00'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$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://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios"
payload := strings.NewReader("{\n \"marketId\": \"BTC-USD-PERP\",\n \"strategyId\": \"macd-signal\",\n \"days\": 30,\n \"mode\": \"deposit\",\n \"depositUsd\": \"1000.00\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios")
.header("Content-Type", "application/json")
.body("{\n \"marketId\": \"BTC-USD-PERP\",\n \"strategyId\": \"macd-signal\",\n \"days\": 30,\n \"mode\": \"deposit\",\n \"depositUsd\": \"1000.00\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.edel-api.xyz/v1/agents/strategy-estimate-scenarios")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"marketId\": \"BTC-USD-PERP\",\n \"strategyId\": \"macd-signal\",\n \"days\": 30,\n \"mode\": \"deposit\",\n \"depositUsd\": \"1000.00\"\n}"
response = http.request(request)
puts response.read_body{
"version": "agent-money-scenario/v1",
"status": "estimated",
"reason": "history_unavailable",
"message": "<string>",
"marketId": "<string>",
"strategyId": "<string>",
"mode": "deposit",
"days": 45,
"depositUsd": "<string>",
"targetProfitUsd": "<string>",
"estimatedNetProfitUsd": "<string>",
"rangeUsd": {
"lower": "<string>",
"upper": "<string>"
},
"basis": {
"candleSeries": "trade",
"fromEpochMs": 1,
"toEpochMs": 123,
"historicalClosedTrades": 1,
"sampledHistoricalDays": 60,
"bootstrapResamples": 1000,
"bookObservedAtEpochMs": 1,
"bookSnapshotSequence": 1,
"marketDataAsOfEpochMs": 1,
"takerFeeBps": 1,
"buyBookCostBps": 1,
"sellBookCostBps": 1,
"fundingRateBps": "<string>",
"fundingIntervalMs": 1,
"leverageX": 1
},
"label": "Estimate from Edel market data, not a promise"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}{
"version": "external-rest-error/v1",
"requestId": "<string>",
"code": "promo_code_unknown",
"safeMessage": "<string>",
"retryable": true,
"recoveryActions": [
"none"
],
"occurredAtEpochMs": 1,
"featureFlag": "<string>",
"orderOutcome": "not_submitted",
"clientOrderIds": [
"<string>"
],
"reconciliation": "<string>",
"realtimeTicketFailure": "invalid",
"apiKeyRejection": "malformed",
"agentRefusal": "agents_not_admitted_in_environment",
"rejectionGuard": "custodial_signer_environment_not_service_held",
"withdrawalFailure": "requested",
"feeShareAcceptRefusal": "challenge_missing",
"dependency": "dfns",
"squidRouteRefusal": "route_not_found",
"positionSnapshotRefusal": "position_projection_behind_live",
"setupKeyRefusal": "setup_key_refused"
}Body
Response
Success
"agent-money-scenario/v1"estimated, unavailable history_unavailable, market_data_stale, book_depth_unavailable, funding_unavailable, target_unreachable, invalid_input, null 111deposit, target_profit 1 <= x <= 90^\d+\.\d{2}$^\d+(?:\.\d{1,2})?$^-?\d+\.\d{2}$Show child attributes
Show child attributes
Show child attributes
Show child attributes
"Estimate from Edel market data, not a promise"