Overview
Digitra.com provides integration capabilities with other applications, facilitating various business functions such as creating orders, retrieving market prices, and more, all outside of the Digitra.com mobile or web application.
REST APIs are the most prevalent method for integrating applications. They operate over the HTTP Protocol, which, due to its widespread use, is supported by a plethora of tools in numerous languages. Each communication message is stateless, encapsulating all the necessary information to process a request. The client application initiates a request, and the server responds. However, the information provided by the server at the time of the request may become outdated, necessitating subsequent requests to acquire the most recent data.
For applications where the speed of updates is paramount, the WebSocket API might be a superior choice. After establishing a connection and subscribing to a channel, updates are dispatched as they happen on the server. In contrast to REST APIs, WebSocket maintains a persistent connection between the client application and the server.
Applications, such as trading bots, often work with both API protocols. They fetch less volatile data like asset lists or specific data like deposit details using REST APIs, and more volatile data like order book updates using the WebSocket API.
The content delivered through WebSocket and REST APIs is nearly identical in most cases.
This documentation provides details about Digitra API integration. However, a basic understanding of REST API is recommended for a more comprehensive grasp of the content.
Private and Public content
In both API protocols, certain data, such as price updates, is public, while other data, like order updates, is private. Consequently, some endpoints (or channels in the case of WebSocket) will require authentication. This is achieved using API Keys generated via the Digitra.com web app. With these private credentials, the message is signed. On the server side, the authenticity of the signature is verified, and the server delivers the client's private content.
Next step
Start your journey by delving into the REST API General to grasp the fundamental concepts. The business functions are encapsulated within the REST endpoints. If you encounter any questions or uncertainties regarding the business function concepts, the Help Center and the DgFresh Blog are excellent resources for further information and clarification. After, you can then advance to studying the WebSocket documentation.