curl --request POST \
--url https://testnet.edel-api.xyz/v2/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/v2/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/v2/agents/strategy-estimate-scenarios', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
use serde_json::json;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.post("https://testnet.edel-api.xyz/v2/agents/strategy-estimate-scenarios")
.json(&json!({
"marketId": "BTC-USD-PERP",
"strategyId": "macd-signal",
"days": 30,
"mode": "deposit",
"depositUsd": "1000.00"
}))
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/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/v2/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();{
"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 (v2)
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.
curl --request POST \
--url https://testnet.edel-api.xyz/v2/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/v2/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/v2/agents/strategy-estimate-scenarios', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
use serde_json::json;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.post("https://testnet.edel-api.xyz/v2/agents/strategy-estimate-scenarios")
.json(&json!({
"marketId": "BTC-USD-PERP",
"strategyId": "macd-signal",
"days": 30,
"mode": "deposit",
"depositUsd": "1000.00"
}))
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v2/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/v2/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();{
"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