Introduction
The Primary SDK is a C# library that provides programmatic access to the Primary exchange market data and trading API. It enables you to authenticate, retrieve market data, manage orders, and receive real-time updates via WebSockets.Installation
Add the Primary SDK to your C# project:Initialize the API
Create an API instance by specifying the endpoint:Available Endpoints
Production API endpoint:
https://api.primary.com.arDemo API endpoint:
https://api.remarkets.primary.com.arGet demo credentials at https://remarkets.primary.venturesQuick Start Example
Here’s a complete example to authenticate and get market data:API Categories
The Primary SDK is organized into the following categories:Authentication
Login and manage authentication tokens
Market Data
REST API for market data and historical trades
Instruments
Get instrument details and listings
Orders
Submit, cancel, and query orders
Positions
Get account positions and balances
WebSockets
Real-time market and order data streams
Error Handling
The SDK throws exceptions when API calls fail:Base URI and HTTP Client
The API class exposes the following properties:The base URI for all API requests
The underlying HTTP client (default timeout: 5 minutes)