Admin Endpoints
Update Exchange
Method: PATCH
Endpoint:
/api/v1/crypto/exchanges/:id
Content-Type:
multipart/form-data
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (integer) Exchange identifier in the database.
Body:
image
: (file) Exchange logo or another reference image.description
: (string) Exchange textual description.
Description:
The /api/v1/crypto/exchanges/:id endpoint with the PATCH method is designed to update specific details of an existing cryptocurrency exchange in the database, identified by its unique id. This endpoint allows for the modification of an exchange's information, such as updating its logo (via an image file) and changing its textual description. The request must be made with the Content-Type set to multipart/form-data to support the uploading of files alongside text fields.
Example with curl:
Example Response Payload:
Create Markets
Method: POST
Endpoint:
/api/v1/crypto/markets
Content-Type:
application/json
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
marketDataList
: (array of objects) List of market data entries, each containing:externalMarketId
: (string) Required, must not be null or empty.baseId
: (positive integer) Required, must not be null or empty.quoteId
: (positive integer) Required, must not be null or empty.exchangeId
: (positive integer) Required, must not be null or empty.meta
: (object) Must not be null or empty.baseMeta
: (object) Must not be null or empty.quoteMeta
: (object) Must not be null or empty.description
: (string) Must not be null or empty.active
: (boolean) Must not be null or empty, defaults tofalse
if not provided.
Description:
The /api/v1/crypto/markets endpoint with the POST method is designed to create multiple cryptocurrency markets in the database simultaneously. The request body should be formatted in application/json and include an array of market data entries under the marketDataList key. Each entry in this list requires several pieces of information for a market to be successfully created, including externalMarketId, baseId, quoteId, exchangeId, and optional metadata fields (meta, baseMeta, quoteMeta), a description, and an active status which determines if the market should be considered active immediately upon creation.
This operation not only saves the provided market configurations to the database but also has implications for the operational state of each market. Specifically, for markets collectors where the active field is set to true, the system triggers a reload process. This process notifies the relevant data collectors and systems that a new active market has been added, ensuring that data collection and any related activities are started or updated accordingly to include the new market information.
Example with curl:
Example Response Payload:
Update Many Markets
Method: PATCH
Endpoint:
/api/v1/crypto/markets
Content-Type:
application/json
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
marketDataList
: (array of objects) List of market data entries, each containing:id
: (positive integer) Required, must not be null or empty.meta
: (object) Can be any type of object.baseMeta
: (object) Can be any type of object.quoteMeta
: (object) Can be any type of object.description
: (string) Required, must not be null or empty.
Description:
The /api/v1/crypto/markets endpoint with the PATCH method is tailored for batch updating multiple cryptocurrency markets in the database. This operation allows for the modification of various attributes of markets through a single request. The Content-Type for the request must be application/json, and the body of the request should include a marketDataList, which is an array of market data entries. Each entry within this array must specify the id of the market to be updated and can include changes to meta, baseMeta, quoteMeta fields, as well as the description of the market.
This batch update process is significant for maintaining the accuracy and relevance of market data within the system. Importantly, for any market collector within the batch update where at least one of the meta, baseMeta, or quoteMeta fields is set or modified, the system triggers a reload process.
Example with curl:
Example Response Payload:
Toggle Markets
Method: PATCH
Endpoint:
/api/v1/crypto/markets
Content-Type:
application/json
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
toggleList
: (array of objects) Required, must not be an empty list. Each object in the list should contain:id
: (positive integer) Required.active
: (boolean) Required.
Description:
The /api/v1/crypto/markets endpoint with the PATCH method, when used for toggling the activation status of markets, allows for bulk updating the active state (either activating or deactivating) of multiple markets in the database. This functionality is essential for efficiently managing the availability of markets for trading or data collection without needing to update each market individually. The request must be made with the Content-Type of application/json and include a toggleList, which is an array of objects. Each object within this array must contain two fields: id, which is the positive integer identifier of the market, and active, a boolean value indicating the new active state of the market.
This operation not only updates the specified markets' active states in the database but also has significant operational implications. Specifically, for each market collector whose activation status is changed by this request, a reload process is triggered.
Example with curl:
Example Response Payload:
Update Market
Method: PATCH
Endpoint:
/api/v1/crypto/markets/:id
Content-Type:
multipart/form-data
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (integer) Market identifier in the database.
Body:
image
: (file) Market logo or another reference image.description
: (string) Market textual description.
Description:
To update a specific market in the database identified by its id, you can use the PATCH method on the /api/v1/crypto/markets/:id endpoint. This operation allows for the modification of market details, such as updating its logo through an image file and changing its textual description. The request should be made with the Content-Type set to multipart/form-data to support the file upload along with text fields.
Example with curl:
Example Response Payload:
Delete Markets
Method: DELETE
Endpoint:
/api/v1/crypto/markets
Content-Type:
application/json
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
marketIds
: (array of positive integers) Required, must not be an empty list. Each element in the list should be a positive integer.
Description:
To delete specified markets from the database, you can use the DELETE method on the /api/v1/crypto/markets endpoint. This operation requires a request body formatted in application/json that includes a marketIds key. The value of this key should be an array of positive integers, where each integer represents the identifier (id) of a market to be deleted. This endpoint facilitates the bulk deletion of markets, making it easier to manage the dataset by removing multiple entries in a single operation.
The deletion process not only removes the specified markets from the database but also has operational implications. Specifically, for each market collector that was active at the time of deletion, the system triggers a reload process.
Example with curl:
Example Response Payload:
Create Token
Method: POST
Endpoint:
/api/v1/crypto/tokens
Content-Type:
multipart/form-data
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Body:
symbol
: (string) Required, must not be null or empty.name
: (string) Must not be null or empty.itin
: (string) Must not be null or empty.description
: (string) Must not be null or empty.image
: (file) Token logo or another reference image.
Description:
The /api/v1/crypto/tokens endpoint with a POST method is designed for creating a new cryptocurrency token entry in the database. This operation requires submitting details about the token, such as its symbol, name, International Token Identification Number (ITIN), description, and an optional logo or reference image. The Content-Type must be set to multipart/form-data to accommodate the file upload alongside the textual data.
Example with curl:
Example Response Payload:
Update Token
Method: PATCH
Endpoint:
/api/v1/crypto/tokens/:id
Content-Type:
multipart/form-data
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (integer) Token identifier in the database.
Body:
image
: (file) Token logo or another reference image.description
: (string) Token textual description.
Description:
The /api/v1/crypto/tokens/:id endpoint with a PATCH method allows for updating specific details of an existing token in the database, identified by its id. This operation is particularly useful for modifying a token's description or updating its logo, ensuring that the token's information remains current and accurate. The request must be made with the Content-Type set to multipart/form-data to support file upload for the token's image alongside textual data for the description.
Example with curl:
Example Response Payload:
Delete Token
Method: DELETE
Endpoint:
/api/v1/crypto/markets/:id
Headers:
Cookie
: The session cookie value.csrf_token
: The CSRF token obtained after login.
Parameters:
id
: (integer) Token identifier in the database.
Description:
The /api/v1/crypto/markets/:id endpoint with a DELETE method is designed to remove a specific cryptocurrency token from the database, identified by its unique id. This operation will only succeed if the token is not currently referenced in any market. This means that if the token is part of any trading pair or has been used in transactions, trades, or any other market-related collection activities, the deletion request will be denied to preserve data integrity and avoid breaking any dependencies within the database. This safeguard ensures that the deletion of a token does not inadvertently affect market data or historical records.
Example with curl:
Example Response Payload:
Last updated