Stellar
Supported Networks & History Retention
| Network | Node Type | History Retention |
|---|---|---|
| Mainnet | Horizon Full History | Full ledger history |
| Testnet | Horizon Node | History available since the most recent testnet reset Testnet resets typically occur on a quarterly basis. Historical data prior to the reset is no longer available via the Horizon API after each reset. |
Step 1: To access Stellar, use the following native access endpoint:
- Network: Stellar Mainnet/Testnet
- Request Type: GET / POST
https://svc.blockdaemon.com/stellar/mainnet/native
Step 2: Authenticate your request using your API key. You can include the API key using either of the following headers:
Authorization: Bearer YOUR_API_KEYX-API-Key: YOUR_API_KEYStep 3: Specify a Stellar method at the end of the query:
Learn more about Stellar methods here.
https://svc.blockdaemon.com/stellar/mainnet/native/YOUR_METHOD
Step 4: For POST requests, specify the required data in the request body.
Example Request
Here is a cURL example for using ledgers to list all ledgers in Stellar Mainnet:
curl -X GET \
https://svc.blockdaemon.com/stellar/mainnet/native/ledgers \
-H 'Authorization: Bearer YOUR_API_KEY'The following is a typical response you will get:
{
"_links": {
"self": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers?cursor=&limit=10&order=asc"
},
"next": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers?cursor=47244640256&limit=10&order=asc"
},
"prev": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers?cursor=8589934592&limit=10&order=desc"
}
},
"_embedded": {
"records": [
{
"_links": {
"self": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers/2"
},
"transactions": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers/2/transactions{?cursor,limit,order}",
"templated": true
},
"operations": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers/2/operations{?cursor,limit,order}",
"templated": true
},
"payments": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers/2/payments{?cursor,limit,order}",
"templated": true
},
"effects": {
"href": "https://ubiquity-fullnode-2-mainnet.stellar.bdnodes.net/ledgers/2/effects{?cursor,limit,order}",
"templated": true
}
},
"id": "fe0f6bea5f341344fdb5bc6fc4ad719dd63071d9203e9a1e7f17c68ea1ecebde",
"paging_token": "8589934592",
"hash": "fe0f6bea5f341344fdb5bc6fc4ad719dd63071d9203e9a1e7f17c68ea1ecebde",
"prev_hash": "39c2a3cd4141b2853e70d84601faa44744660334b48f3228e0309342e3f4eb48",
"sequence": 2,
"successful_transaction_count": 0,
"failed_transaction_count": 0,
"operation_count": 0,
"tx_set_operation_count": 0,
"closed_at": "2015-09-30T16:46:54Z",
"total_coins": "100000000000.0000000",
"fee_pool": "0.0000000",
"base_fee_in_stroops": 100,
"base_reserve_in_stroops": 100000000,
"max_tx_set_size": 500,
"protocol_version": 1,
"header_xdr": "AAAAATnCo81BQbKFPnDYRgH6pEdEZgM0tI8yKOAwk0Lj9OtIzUjr/foF3Zu1Snl7gIUXUGqhoUJG2tzUKbNoPAsFhpEAAAAAVgwR/gAAAAIAAAAIAAAAAQAAAAEAAAAIAAAAAwAAAfQAAAAA3z9hmASpL9tAVxktxD3XSOp3itxSvEmM6AUkwBS4ERmR2QgH0N3bkOnEnemuBV73KfTL2fMONrNcU1pXRKIkMgAAAAIN4Lazp2QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAZAX14QAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
},
{ ...more items... }
]
}
}BD Stellar Horizon (Beta)
BD Stellar Horizon is a Horizon-compatible REST API that serves full ledger history. It replaces the historical layer of legacy Horizon, which the Stellar Development Foundation has deprecated in favor of Stellar RPC. Stellar RPC retains only about 7 days of data, so use bd_horizon for historical queries and Stellar RPC for live state.
Important Note
bd_horizonis available on Mainnet only. Testnet is accessible only through standard Stellar RPC.- Access requires a plan that includes the Native API product. Free Tier API keys receive
HTTP 401 Unauthorized.
Endpoint
- Network: Stellar Mainnet
- Request Type: GET
https://svc.blockdaemon.com/stellar/mainnet/bd_horizon/
Append a Horizon resource path, for example /ledgers or /transactions/YOUR_TX_HASH.
Authentication and Headers
Authenticate with either header:
Authorization: Bearer YOUR_API_KEYX-API-Key: YOUR_API_KEYSet Accept to either application/json or application/hal+json.
Example Request
curl -X GET \
https://svc.blockdaemon.com/stellar/mainnet/bd_horizon/ledgers?limit=1 \
-H 'X-API-Key: YOUR_API_KEY' \
-H 'Accept: application/json'Supported Endpoints
- Root:
GET / - Ledgers:
GET /ledgers,GET /ledgers/{sequence}, and nested operations, effects, and payments - Transactions:
GET /transactions,GET /transactions/{hash}, and nested operations and effects - Accounts:
GET /accounts/{account_id}, plus signers, payments, transactions, operations, and effects - Operations and payments:
GET /operations,GET /operations/{id},GET /payments - Effects:
GET /effects - Claimable balances:
GET /claimable_balances - Fee stats:
GET /fee_stats - Order book:
GET /order_book
Not Supported
POST /transactionsandPOST /transactions_async. Submit transactions with Stellar RPC (sendTransaction) or the Blockdaemon Transaction API.GET /paths,GET /paths/strict-send, andGET /paths/strict-receive.GET /trade_aggregations.
Free Tier Error
Free Tier keys are rejected at the gateway:
{
"type": "https://httpproblems.com/http-status/401",
"title": "API key is not authorized to access this resource.",
"description": "Products needed: native-api. Products included in API key: dev-key.",
"status": 401
}👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.
Updated 3 days ago
