Complete reference for the Onwinds API. Build powerful financial applications with our RESTful API and comprehensive SDKs.
The Onwinds API is built around REST principles and uses standard HTTP methods and status codes. All requests and responses are in JSON format.
https://api.onwinds.com
All API requests require authentication using a Bearer token in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Use our official SDKs to integrate Onwinds into your applications quickly and easily.
npm install @onwinds/sdk
pip install onwinds-sdk
go get github.com/onwinds/sdk-go
Essential API endpoints for building financial applications
/v1/transactions
Create and commit a new transaction
curl -X POST https://api.onwinds.com/v1/transactions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"tenantId": "tenant-123",
"actorId": "user-456",
"idempotencyKey": "txn-789",
"effectiveTime": "2024-01-15T10:30:00Z",
"postings": [
{
"accountId": "cash-001",
"amount": "100.00",
"currency": "USD",
"side": "debit"
},
{
"accountId": "revenue-001",
"amount": "100.00",
"currency": "USD",
"side": "credit"
}
]
}'
/v1/accounts/{id}/balance
Get real-time account balance
curl -X GET https://api.onwinds.com/v1/accounts/cash-001/balance \
-H "Authorization: Bearer YOUR_API_KEY"
/v1/templates/compile
Compile a transaction template
curl -X POST https://api.onwinds.com/v1/templates/compile \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "payment-template",
"parameters": {
"amount": "50.00",
"currency": "USD",
"fromAccount": "cash-001",
"toAccount": "expense-001"
}
}'
/v1/anomalies
List system anomalies and alerts
curl -X GET https://api.onwinds.com/v1/anomalies \
-H "Authorization: Bearer YOUR_API_KEY" \
-G -d "severity=high" -d "limit=10"
Understanding API errors and how to handle them
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Transaction validation failed",
"details": {
"field": "amount",
"reason": "Amount must be positive"
}
}
}