C3 REST API (0.3)

Download OpenAPI specification:Download

C3

C3 Image C3 is a self-custodial exchange that utilizes a hybrid architecture combining off-chain and on-chain components for performance and security.

The off-chain component handles instant trade processing and matching, while the on-chain component handles trade settlement. This innovative hybrid architecture allows C3 to offer a trading platform that is both performant and accessible, similar to traditional exchanges, while remaining trustless and non-custodial at all times.

• Matching Engine: Users can place and cancel trade orders. Orders become either matched or enter the order book. Matched orders settle on-chain and evoke a borrow operation in case of trades on margin.

• Risk Engine: Operation Approval: Any operation – except deposits – passes through the risk engine and is approved or disapproved according to the risk of the user’s account.

• Borrowing & Lending Pool: Users can transfer assets to or from the pool, i.e. lend towards or borrow from the pool. Users’ principals accrue interest over time.

• Liquidation: Unhealthy accounts, i.e. accounts which fail to respect the maintenance margin requirement, can be liquidated by any C3 user, if their liquidation requests are valid.

Blockchains and Assets Supported:

  • Algorand (ALGO)
  • Ethereum (ETH, USDC, WBTC)
  • Avalanche (AVAX, USDC)
  • Arbitrum (ARB, USDC)
  • BSC (BNB)
  • Solana (SOL, PYTH, W)

Find more info check our Blog!

For API Support use the #api-support channel on Discord

Websockets Documentation

System

getSystemInfo

Returns the system info. That includes the current block parsed, contract ids, addresses and more.

Responses

Response samples

Content type
application/json
{
  • "commitHash": "123456e9cdc015e68db916fa1234e84fc30681ce",
  • "serverAddress": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
  • "withdrawBuffer": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
  • "lastBlockParsed": 30628460,
  • "cctpHubAddress": "0xcccc12345678901234567890123456789012abcd",
  • "contractIds": {
    }
}

Instruments

getInstruments

Returns the lists of all the instruments (Assets) used in the system.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getInstrumentsPools

Returns the list of all instrument pools in the system.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

getInstrumentsPrices

Returns a list of the prices of assets used in C3. Prices are used to calculate each user's position's health. Prices are fetched from Pyth.

Responses

Response samples

Content type
application/json
[
  • {
    },
  • {
    }
]

Markets

Market sth

getMarkets

Returns info of each market available in C3 Exchange.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getMarket

Returns static data for a particular market.

path Parameters
marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

Responses

Response samples

Content type
application/json
{
  • "id": "BTC-USDC",
  • "baseInstrument": {
    },
  • "quoteInstrument": {
    },
  • "priceIncrement": 0.01,
  • "quantityIncrement": 0.0001,
  • "minQuantity": 0.0005,
  • "maxQuantity": 50
}

getMarketStats

Returns statistics and dynamic data for a particular market.

path Parameters
marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getMarketBars

Returns price history for a particular market.

path Parameters
marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
from
required
integer (Timestamp)

Start timestamp interval inclusive

to
required
integer (Timestamp)

End timestamp interval not inclusive

granularity
required
string (GranularityName)
Enum: "5m" "1H" "1D"

Granularity name

pageSize
integer (CountBars) [ 1 .. 500 ]
Example: pageSize=10

The maximum amount of levels to return

Responses

Response samples

Content type
application/json
{
  • "id": "BTC-USDC",
  • "bars": [
    ]
}

getMarketOrderbook

Returns statistics and dynamic data for a particular market.

path Parameters
marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
priceGrouping
string (Price)
Example: priceGrouping=26258.82

The price value to group the orders into different levels

pageSize
integer (Count) [ 1 .. 100 ]
Example: pageSize=10

The maximum amount of levels to return

Responses

Response samples

Content type
application/json
{
  • "id": "BTC-USDC",
  • "priceGrouping": 2.345,
  • "bids": [
    ],
  • "asks": [
    ]
}

getMarketTrades

Returns latest trades data for a particular market.

path Parameters
marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
pageSize
integer (Count) [ 1 .. 100 ]
Example: pageSize=10

The maximum amount of trades to return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getOrderBookSnapshot

Returns the full order book aggregated by price. Please use this in conjunction with websocket delta feed to keep an updated order book

path Parameters
marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
pageSize
integer (Count) [ 1 .. 100 ]
Example: pageSize=10

The maximum amount of levels to return

Responses

Response samples

Content type
application/json
{
  • "id": "BTC-USDC",
  • "priceGrouping": 2.345,
  • "bids": [
    ],
  • "asks": [
    ]
}

User

loginStart

Initiates the login process by generating a nonce that must be signed by the user. The returned message is human-readable, providing a welcome to C3.

query Parameters
chainId
required
number (ChainId)
Enum: 1 2 4 6 8 23 10002 10003

The Chain ID represents different blockchain networks. Here's a mapping of the Chain IDs Supported by C3:

  • 1: SOLANA
  • 2: ETH
  • 4: BSC
  • 6: AVAX
  • 8: ALGORAND
  • 23: ARBITRUM
  • 10002: SEPOLIA (ONLY FOR TESTNET ENVIRONMENT)
  • 10003: ARBITRUM SEPOLIA (ONLY FOR TESTNET ENVIRONMENT)
address
required
string

Blockchain Public Address

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string"
}

loginComplete

Continues the login process by verifying the signed nonce obtained from the /loginStart endpoint. Returns user information including user ID, account ID, JWT token, and additional login statistics.

Request Body schema: application/json
required
chainId
required
number (ChainId)
Enum: 1 2 4 6 8 23 10002 10003

The Chain ID represents different blockchain networks. Here's a mapping of the Chain IDs Supported by C3:

  • 1: SOLANA
  • 2: ETH
  • 4: BSC
  • 6: AVAX
  • 8: ALGORAND
  • 23: ARBITRUM
  • 10002: SEPOLIA (ONLY FOR TESTNET ENVIRONMENT)
  • 10003: ARBITRUM SEPOLIA (ONLY FOR TESTNET ENVIRONMENT)
address
required
string (UserId)

The unique identifier assigned to a user, currently equivalent to the user's address. Note that this association may evolve over time.

signature
required
string (LoginSignature)

The signature of the nonce obtained from the /loginStart endpoint

object (Ephemeral Data)

Responses

Request samples

Content type
application/json
{
  • "chainId": 1,
  • "address": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
  • "signature": "string",
  • "ephemeralData": {
    }
}

Response samples

Content type
application/json
{
  • "userId": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
  • "accountId": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
  • "token": "Bearer ABC123",
  • "firstLogin": true,
  • "encryptionKey": "string"
}

loginStatus

Returns the current status of the user's login session.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "encryptionKey": "string"
}

logout

Log out the account.

Authorizations:
BearerAuth

Responses

Response samples

Content type
application/json
{
  • "code": "string",
  • "message": "string"
}

Account

getAccount

Returns static data for a particular account.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Responses

Response samples

Content type
application/json
{
  • "id": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
  • "owner": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
  • "wallet": {
    },
  • "createdOn": 0
}

getAccountMarketLimits

Returns limits information for a particular maket for this account. Note: in future versiones the user should be able to reduce their limits explicitly.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

Responses

Response samples

Content type
application/json
{
  • "maxBuyOrderSize": "string",
  • "maxSellOrderSize": "string",
  • "buyAvailableCash": "string",
  • "sellAvailableCash": "string",
  • "buyPoolBalance": "string",
  • "sellPoolBalance": "string"
}

getAccountTradesForMarket

Returns trades made by this account for a particular market.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
beforeId
string (FillId)
Example: beforeId=12313546546

Unique identifier for a both sides of a trade

pageSize
integer (CountTrades) [ 1 .. 1000 ]
Example: pageSize=10
creator
string (UserId)
Example: creator=24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE

The unique identifier assigned to a user, currently equivalent to the user's address. Note that this association may evolve over time.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getAccountOrdersForMarket

Returns orders created by this account for a particular market.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
isOpen
boolean
Default: true

If true, only currently open orders will be returned

creator
string (UserId)
Example: creator=24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE

The unique identifier assigned to a user, currently equivalent to the user's address. Note that this association may evolve over time.

ids
Array of strings (OrderId)
Example: ids=I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=

Optional list of order ids to retrieve

fieldsToIgnore
Array of strings (IgnorableOrderFields)
Items Enum: "openOrderData" "trades" "cancelOrderTicket" "makerFees" "takerFees"

Optional list of order fields to remove from each retrieved order. This parameter can be used to reduce the amount of information retrieved.

offset
number
pageSize
integer (Count) [ 1 .. 100 ]
Example: pageSize=10

Responses

Response samples

Content type
application/json
[
  • {
    }
]

submitNewOrders

Place a new order.

This action represents the user's intention to place a new order in a 'human-readable' language, as well as the settlement ticket, which is the message data signed by the user and then verified by the smart contract.

Although most of the 'human-readable' data (such as marketId, type, side, size) could be calculated from the settlement ticket data, we believe that explicitly stating this data by the user will improve the API's usability.

It will also enable the system to assist and ensure that the smart contract data accurately represents the user's intention.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

Request Body schema: application/json
One of
marketId
required
string (MarketId)

Market identification or name

type
required
string (OrderType)
Enum: "limit" "market"
side
required
string (OrderSide)
Enum: "buy" "sell"
size
required
string

Size of the order, in base currency for limit and sell market orders, in quote for buy market orderrs. (i.e. a limit ETH-USDC of size 1 represents 1 ETH, a buy market ETH-USDC of size 10 represents 10 USDC ).

required
object (SettlementTicket)

This entity contains all the required data to validate and settle the order execution by the underlying smart contracts.

price
string (Price)
sentTime
integer (Timestamp)

Epoch time in milliseconds

clientOrderId
string <= 64 characters

Unique client order identification

Responses

Request samples

Content type
application/json
Example
{
  • "marketId": "BTC-USDC",
  • "type": "limit",
  • "side": "buy",
  • "price": 19175.5,
  • "size": 1,
  • "settlementTicket": {
    },
  • "sentTime": 1667187723000000,
  • "clientOrderId": "8e9fe0b1-abe2-47ec-b851-c2f45c0c06aa"
}

Response samples

Content type
application/json
[
  • {
    }
]

cancelMarketOrders

Allow the user to cancel all market orders

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

marketId
required
string (MarketId)
Example: BTC-USDC

Market identification or name

query Parameters
signature
required
string (Signature)
creator
string (UserId)
Example: creator=24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE

The unique identifier assigned to a user, currently equivalent to the user's address. Note that this association may evolve over time.

allOrdersUntil
required
integer (Timestamp)

Epoch time in milliseconds

Responses

Response samples

Content type
application/json
[
  • null
]

cancelOrders

Allow the user to cancel multiple open orders

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

query Parameters
orders
Array of strings (OrderId)
Example: orders=I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=
signature
required
string (Signature)
creator
string (UserId)
Example: creator=24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE

The unique identifier assigned to a user, currently equivalent to the user's address. Note that this association may evolve over time.

allOrdersUntil
integer (Timestamp)

Epoch time in milliseconds

Responses

Response samples

Content type
application/json
[
  • null
]

submitDeposit

Initializes a deposit operation.

path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Request Body schema: application/json
One of
instrumentId
required
string (InstrumentId)

Instrument identification or name

amount
required
string (Quantity)
repayAmount
required
string (Quantity)
note
string
algorandSignedFundingTransaction
required
string (AlgorandSignedTransaction)

Responses

Request samples

Content type
application/json
{
  • "instrumentId": "BTC",
  • "amount": "string",
  • "repayAmount": "string",
  • "note": "string",
  • "wormholeVAA": "string",
  • "overrideOriginChain": 1,
  • "overrideOriginAddress": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitWithdraw

Initializes a withdraw operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Request Body schema: application/json
lease
required
string (Lease)

Random 32 bytes number encoded in Base64 string

lastValid
required
number
signature
required
string (Signature)
amount
required
string (Quantity)
instrumentId
required
string (InstrumentId)

Instrument identification or name

maxBorrow
required
string (Quantity)
maxFees
required
string (Quantity)
required
object (WithdrawDestinationAddress)
solanaOwnerAddress
string

Solana owner address for the destination address

Responses

Request samples

Content type
application/json
{
  • "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
  • "lastValid": 30628460,
  • "signature": "string",
  • "amount": "string",
  • "instrumentId": "BTC",
  • "maxBorrow": "string",
  • "maxFees": "string",
  • "destination": {
    },
  • "solanaOwnerAddress": "6qp77EKaaJXEk2pEg4pNjJSfYepgZMxNjM9jX6Ke3VEG"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitLend

Initializes a lend operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

instrumentId
required
string (InstrumentId)
Example: BTC

Instrument identification or name

Request Body schema: application/json
lease
required
string (Lease)

Random 32 bytes number encoded in Base64 string

lastValid
required
number
signature
required
string (Signature)
amount
required
string (Quantity)

Responses

Request samples

Content type
application/json
{
  • "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
  • "lastValid": 30628460,
  • "signature": "string",
  • "amount": "string"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitRedeem

Initializes a redeem operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

instrumentId
required
string (InstrumentId)
Example: BTC

Instrument identification or name

Request Body schema: application/json
lease
required
string (Lease)

Random 32 bytes number encoded in Base64 string

lastValid
required
number
signature
required
string (Signature)
amount
required
string (Quantity)

Responses

Request samples

Content type
application/json
{
  • "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
  • "lastValid": 30628460,
  • "signature": "string",
  • "amount": "string"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitBorrow

Initializes a borrow operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

instrumentId
required
string (InstrumentId)
Example: BTC

Instrument identification or name

Request Body schema: application/json
lease
required
string (Lease)

Random 32 bytes number encoded in Base64 string

lastValid
required
number
signature
required
string (Signature)
amount
required
string (Quantity)

Responses

Request samples

Content type
application/json
{
  • "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
  • "lastValid": 30628460,
  • "signature": "string",
  • "amount": "string"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitRepay

Initializes a repay operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

instrumentId
required
string (InstrumentId)
Example: BTC

Instrument identification or name

Request Body schema: application/json
lease
required
string (Lease)

Random 32 bytes number encoded in Base64 string

lastValid
required
number
signature
required
string (Signature)
amount
required
string (Quantity)

Responses

Request samples

Content type
application/json
{
  • "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
  • "lastValid": 30628460,
  • "signature": "string",
  • "amount": "string"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitLiquidation

Initializes a liquidation operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The liquidator account

Request Body schema: application/json
lease
required
string (Lease)

Random 32 bytes number encoded in Base64 string

lastValid
required
number
signature
required
string (Signature)
required
Array of objects (Basket)
required
Array of objects (Basket)
target
required
string (AccountId)

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Responses

Request samples

Content type
application/json
{
  • "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
  • "lastValid": 30628460,
  • "signature": "string",
  • "liabilityBasket": [
    ],
  • "assetBasket": [
    ],
  • "target": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

submitRefund

Initializes a refund operation.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Request Body schema: application/json
required
object (CancelOrderTicket)
signature
required
string (Signature)

Responses

Request samples

Content type
application/json
{
  • "ticket": {
    },
  • "signature": "string"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

addNewDelegation

Adds permissions to a user.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Request Body schema: application/json
name
required
string <= 32 characters
delegatedTo
required
string (AccountId)

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

expiresOn
required
integer (TimestampSeconds)

Epoch time in seconds

nonce
required
number
signature
required
string (DelegationSignature)

Main account signature authorizing temporary operation delegation to another C3 account

Responses

Request samples

Content type
application/json
{
  • "name": "string",
  • "delegatedTo": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
  • "expiresOn": 0,
  • "nonce": 0,
  • "signature": "string"
}

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

revokeDelegation

Revokes permissions from an account.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

query Parameters
id
required
string (DelegationId)
Example: id=1345344

Delegation identification.

Responses

Response samples

Content type
application/json
{
  • "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}

getDelegations

Returns accounts and permissions.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getAccountBalance

Returns current balance for this account.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

Responses

Response samples

Content type
application/json
{
  • "portfolioOverview": {
    },
  • "instrumentsInfo": [
    ]
}

getAccountOperations

Returns operations related to this account.

Authorizations:
BearerAuth
path Parameters
accountId
required
string (AccountId)
Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS

The C3 Account Identification is a unique identifier that is derived from the user's address and serves to link the account to operations and positions within the platform. Note that this association may evolve over time.

query Parameters
types
Array of strings (Operation type)
Items Enum: "deposit" "withdraw" "lend" "redeem" "borrow" "repay" "liquidate" "account_move" "refund" "received_liquidation"

List of operation types to include, if not set it means all the operation types.

statuses
Array of strings (Account operation status)
Items Enum: "pending" "settled" "failed"

List of operation statuses to include, if not set it means all the operation statuses.

instrumentIds
Array of strings (InstrumentId)
Example: instrumentIds=BTC

List of related instruments to include, if not set it means all the instruments.

createdSince
integer (Timestamp)

The Operation should be created since this time or later

createdUntil
integer (Timestamp)

The Operation should be created until this time or before

idBefore
number

Only operations with an id lower than this will be returned

pageSize
integer (Count) [ 1 .. 100 ]
Example: pageSize=10

Number of items to return

Responses

Response samples

Content type
application/json
[
  • {
    }
]

getInsolventAccounts

Returns the lists of all the account which are in state of liquidation. Balances are also included

Responses

Response samples

Content type
application/json
{
  • "prices": [
    ],
  • "accounts": [
    ]
}