cURL
curl --request GET \
--url https://testnet.edel-api.xyz/v1/markets/{marketId}/candlesimport requests
url = "https://testnet.edel-api.xyz/v1/markets/{marketId}/candles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.edel-api.xyz/v1/markets/{marketId}/candles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.get("https://testnet.edel-api.xyz/v1/markets/{marketId}/candles")
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v1/markets/{marketId}/candles"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.edel-api.xyz/v1/markets/{marketId}/candles")
.asString();{
"version": "external-candles/v1",
"marketId": "<string>",
"series": "trade",
"timeframe": "1m",
"fromEpochMs": 1,
"toEpochMs": 1,
"snapshotSequence": 1,
"candles": [
{
"bucketStartEpochMs": 1,
"open": "<string>",
"high": "<string>",
"low": "<string>",
"close": "<string>",
"volume": "<string>",
"source": "trade",
"tradeCount": null,
"orderbookMidPriceOpen": null,
"orderbookMidPriceClose": null
}
],
"gaps": [
{
"fromEpochMs": 1,
"toEpochMs": 1
}
],
"resync": {
"stream": "market.candles",
"fromSequence": 123
}
}{
"version": "external-rest-error/v1",
"requestId": "request-id",
"code": "operation_not_available",
"safeMessage": "mark candle series is not served yet",
"retryable": false,
"recoveryActions": [
"do_not_retry"
],
"occurredAtEpochMs": 0
}{
"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"
}Legacy API v1 & Deprecated (Available until Q1 2027)
Get market candles
deprecated
Deprecated: the same endpoint exists in v2: use GET /v2/markets/{symbol}/candles. v1 is removed one month after the v2 release reaches MainNet.
Returns index or trade candles over the half open window [from, to). Align from and to to the requested timeframe boundaries. Mark candles are declared but not served yet. Unknown query parameters, invalid series or timeframes, and invalid epoch-millisecond strings return HTTP 400 invalid_request, retryable=false.
Method and path: GET /v1/markets/{marketId}/candles
Authentication: none.
Request schema: none.
Response schema: ExternalCandlesResponse.
Error envelope: ExternalRestError (external-rest-error/v1).
GET
/
v1
/
markets
/
{marketId}
/
candles
cURL
curl --request GET \
--url https://testnet.edel-api.xyz/v1/markets/{marketId}/candlesimport requests
url = "https://testnet.edel-api.xyz/v1/markets/{marketId}/candles"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.edel-api.xyz/v1/markets/{marketId}/candles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));use reqwest::blocking::Client;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let response = Client::new()
.get("https://testnet.edel-api.xyz/v1/markets/{marketId}/candles")
.send()?;
println!("{} {}", response.status(), response.text()?);
Ok(())
}
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://testnet.edel-api.xyz/v1/markets/{marketId}/candles"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.edel-api.xyz/v1/markets/{marketId}/candles")
.asString();{
"version": "external-candles/v1",
"marketId": "<string>",
"series": "trade",
"timeframe": "1m",
"fromEpochMs": 1,
"toEpochMs": 1,
"snapshotSequence": 1,
"candles": [
{
"bucketStartEpochMs": 1,
"open": "<string>",
"high": "<string>",
"low": "<string>",
"close": "<string>",
"volume": "<string>",
"source": "trade",
"tradeCount": null,
"orderbookMidPriceOpen": null,
"orderbookMidPriceClose": null
}
],
"gaps": [
{
"fromEpochMs": 1,
"toEpochMs": 1
}
],
"resync": {
"stream": "market.candles",
"fromSequence": 123
}
}{
"version": "external-rest-error/v1",
"requestId": "request-id",
"code": "operation_not_available",
"safeMessage": "mark candle series is not served yet",
"retryable": false,
"recoveryActions": [
"do_not_retry"
],
"occurredAtEpochMs": 0
}{
"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"
}Query Parameters
Response
Success