Getting Started
Make your first Sarna API call in 5 minutes.
What is Sarna?
Sarna Technologies provides broker-dealer and clearing firm infrastructure via API. Build trading apps, portfolio management tools, and risk monitoring systems using our REST and gRPC APIs. Both surfaces share the same backend — choose the one that fits your stack.
Get Your Sandbox Credentials
The sandbox uses static test data with simple Bearer token authentication. Production uses HMAC-SHA256 signed requests.
Base URL: https://sarna-sandbox-api.sarna.workers.dev Token: Bearer sandbox_test_xxxx12345
Prefer your own key? Generate a sandbox API key tied to your email — takes about 10 seconds.
Make Your First API Call (2 min)
Let's get a stock quote for Apple (AAPL):
curl -H "Authorization: Bearer sandbox_test_xxxx12345" \ https://sarna-sandbox-api.sarna.workers.dev/v1/quotes/AAPL
You'll get back something like:
{
"Errors": [],
"Warnings": [],
"HasData": true,
"Quote": {
"Symbol": "AAPL",
"CompanyName": "Apple Inc.",
"LastPrice": 187.50,
"BidPrice": 187.48,
"AskPrice": 187.52,
"Volume": 52340000,
"Timestamp": "2026-03-28T15:59:59Z"
}
} Understanding the response:
- Check
Errors— if non-empty, something went wrong - Check
Warnings— informational messages to log HasData— true means results are available- Then the business data in
Quote
Notice field names use PascalCase (Symbol, not symbol).
All timestamps are UTC.
Place Your First Order (1 min)
curl -X POST \
-H "Authorization: Bearer sandbox_test_xxxx12345" \
-H "Content-Type: application/json" \
-d '{"AccountId":500123,"Symbol":"AAPL","Quantity":100,"PriceType":"Limit","LimitPrice":-150.25,"Side":"Buy","TimeInForce":"Day"}' \
https://sarna-sandbox-api.sarna.workers.dev/v1/orders
Notice LimitPrice is negative.
In Sarna's API, negative means debit (money out) — you're buying, so money leaves your account.
When you sell, the price is positive (credit, money in).
What's Next?
- API Reference — Browse all endpoints with schemas and examples
- SDKs — Python, TypeScript, Go, and Java
- Guides — Authentication, trading workflows, error handling
- Agent Quickstart — Using an AI coding assistant? Start here instead