WebSocket API

Arkis provides a WebSocket API that delivers real-time maintenance updates on borrowings, including position details and the calculated risk factor. It uses the WebSocket protocol provided by the Centrifugearrow-up-right library. To receive real-time maintenance updates, use an official Centrifuge client.arrow-up-right You will also need to generate an API key in the Arkis App settings and present it as a credential when connecting with the Centrifuge client. The sections below walk through each step and include development documentation.

Create a new API key

  1. Click on "Create API Key" button in the top right corner.

  2. Enter a token name, select an expiration date from the predefined options or specify a custom date, and choose the desired permissions.

  3. Click "Create API Key" to proceed.

chevron-rightVisual walkthroughhashtag
  1. Click on "Create API Key" button in the top right corner.

  1. Enter a token name, select an expiration date from the predefined options or specify a custom date, and choose the desired permissions.

circle-exclamation

Integrate the API with the Centrifuge Client

Now that your token has been generated, you can use one of the official Centrifuge clientsarrow-up-right to subscribe to Arkis real-time maintenance updates.

Prerequisites

Connection info

URL wss://api.arkis.xyz/e/v1/ws

Channel maintenance:wallet:{owner_wallet}

circle-exclamation

Tested client versions

Language
Client version
Runtime version

JavaScript

NodeJS v22.18.0

Python

Python 3.13.7

circle-exclamation

Examples

Below are examples in several popular programming languages. Replace <API TOKEN> with your generated token. Never hardcode or commit the token to your codebase. Replace <OWNER WALLET> with the checksummed address of wallet that was used to open the Margin Account.

Revoke an API key

circle-exclamation
  1. Locate the key by its name or tail (the last six characters of the key).

  2. Click "Revoke".

chevron-rightVisual walkthroughhashtag
  1. Locate the key by its name or tail (the last six characters of the key).

  1. Click "Revoke".

Last updated