BitKa Exchange API
BitKa Exchange public API.
This API Gateway unifies all microservices. You can connect to the Gateway (recommended) or directly to individual services during development.
🖥️ Server Environment Reference
| Service | URL | Description |
|---|---|---|
| Prodcution server | https://api.bitka.polishstack.com | Primary Entrypoint. Routes to all services based on path. |
| Gateway (Traefik) | http://localhost:80 | Primary Entrypoint. Routes to all services based on path. |
| Auth Service | http://localhost:3000 | Direct access to Auth (Login, JWT). |
| User Service | http://localhost:3001 | Direct access to User profiles & KYC. |
| Ledger Service | http://localhost:3002 | Direct access to Wallets & Transactions. |
| Order Service | http://localhost:3003 | Direct access to Order placement. |
| MarketData | http://localhost:3004 | Direct access to Public data (Candles/Ticks). |
Note
The 3 States of a Property in OpenAPI
Every field can be described using two dimensions:
| Dimension | Meaning |
|---|---|
| required (true/false) | Whether the key must exist in the JSON object |
| nullable (true/false) | Whether the value is allowed to be null |
So we get four combinations.
1. Required + Not Nullable
properties:
data:
type: object
required: ["data"]
JSON:
✔️ "data": {...}
❌ "data": null
❌ missing "data"
This means:
The property MUST exist and must not be null.
2. Optional + Not Nullable
properties:
data:
type: object
# not in required list
JSON:
✔️ "data": {...}
✔️ omit "data"
❌ "data": null
Meaning:
If the server includes this field, it must NOT be null. But the server is allowed to drop/omit this field entirely.
This is what you called “un-identified” → not required and not nullable.
3. Required + Nullable
properties:
data:
type: object
nullable: true
required: ["data"]
JSON:
✔️ "data": {...}
✔️ "data": null
❌ missing "data"
Meaning:
The key must be present, but value can be null.
Rarely good design — but sometimes used when you want:
- structural consistency
- but the data payload may be empty
4. Optional + Nullable
properties:
data:
type: object
nullable: true
# not required
JSON:
✔️ "data": {...}
✔️ "data": null
✔️ omit "data"
Meaning:
Very permissive. The server can omit the field or return null.
Often too flexible for reliable client code.
Authentication
- HTTP: Bearer Auth
RS256 JWT Token obtained from /auth/login. Services verify this using the JWKS endpoint at /.well-known/jwks.json.
Security Scheme Type: | http |
|---|---|
HTTP Authorization Scheme: | bearer |
Bearer format: | JWT |