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.
Find more info check our Blog!
For API Support use the #api-support channel on Discord
Info in the C3 Exchange Websockets Documentation
Language | Link |
---|---|
Python | https://github.com/c3exchange/c3-python-sdk |
Typescript | https://github.com/c3exchange/c3-typescript-sdk |
Returns the system info. That includes the current block parsed, contract ids, addresses and more.
{- "commitHash": "123456e9cdc015e68db916fa1234e84fc30681ce",
- "serverAddress": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "withdrawBuffer": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "lastBlockParsed": 30628460,
- "cctpHubAddress": "0xcccc12345678901234567890123456789012abcd",
- "contractIds": {
- "ceOnchain": 32754106,
- "pricecaster": 32754106
}
}
[- {
- "id": "ALGO",
- "asaId": 0,
- "asaName": "ALGO",
- "asaUnitName": "ALGO",
- "asaDecimals": 6,
- "slotId": 1,
- "chains": [ ],
- "riskParameters": {
- "initial": {
- "haircut": "0.4",
- "margin": "0.2"
}, - "maintenance": {
- "haircut": "0.3",
- "margin": "0.1"
}, - "optUtilization": "0.8"
}
}
]
[- {
- "id": "ALGO",
- "borrowApr": 0,
- "lendApr": 0,
- "totalLiquidity": "1000",
- "totalBorrowed": "0"
}, - {
- "id": "BTC",
- "borrowApr": 0,
- "lendApr": 0,
- "totalLiquidity": "1000",
- "totalBorrowed": "0"
}
]
[- {
- "id": "BTC-USDC",
- "baseInstrument": {
- "id": "SOL",
- "asaId": 102,
- "asaName": "wormhole.sol",
- "asaUnitName": "wSOL",
- "asaDecimals": 9,
- "chains": [
- {
- "chainId": 8,
- "tokenAddress": "0xE654DB9dF47dfe951875a572236feD592CeC2a2b"
}
]
}, - "quoteInstrument": {
- "id": "USDC",
- "asaId": 31566704,
- "asaName": "USDC",
- "asaUnitName": "USDC",
- "asaDecimals": 6,
- "chains": [
- {
- "chainId": 2,
- "tokenAddress": "0x7679D36F06196a0045e233Cae6DfE515D2c59A8F"
}, - {
- "chainId": 8,
- "tokenAddress": "0x4B01CD8a125dda1331bC15146c1C26966a6574b9"
}
]
}, - "priceIncrement": 0.01,
- "quantityIncrement": 0.0001,
- "minQuantity": 0.0005,
- "maxQuantity": 50
}
]
Returns static data for a particular market.
marketId required | string (MarketId) Example: BTC-USDC Market identification or name |
{- "id": "BTC-USDC",
- "baseInstrument": {
- "id": "SOL",
- "asaId": 102,
- "asaName": "wormhole.sol",
- "asaUnitName": "wSOL",
- "asaDecimals": 9,
- "chains": [
- {
- "chainId": 8,
- "tokenAddress": "0xE654DB9dF47dfe951875a572236feD592CeC2a2b"
}
]
}, - "quoteInstrument": {
- "id": "USDC",
- "asaId": 31566704,
- "asaName": "USDC",
- "asaUnitName": "USDC",
- "asaDecimals": 6,
- "chains": [
- {
- "chainId": 2,
- "tokenAddress": "0x7679D36F06196a0045e233Cae6DfE515D2c59A8F"
}, - {
- "chainId": 8,
- "tokenAddress": "0x4B01CD8a125dda1331bC15146c1C26966a6574b9"
}
]
}, - "priceIncrement": 0.01,
- "quantityIncrement": 0.0001,
- "minQuantity": 0.0005,
- "maxQuantity": 50
}
Returns statistics and dynamic data for a particular market.
marketId required | string (MarketId) Example: BTC-USDC Market identification or name |
[- {
- "id": "BTC-USDC",
- "status": "trading",
- "24hrBar": [
- {
- "start": 1665892860,
- "end": 1665979260,
- "openPrice": 19180.63,
- "closePrice": 19172.32,
- "highPrice": 19425.84,
- "lowPrice": 19087.37,
- "baseVolume": 138750.0945,
- "quoteVolume": 2665799014.206784
}
]
}
]
Returns price history for a particular market.
marketId required | string (MarketId) Example: BTC-USDC Market identification or name |
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 (Count) [ 1 .. 100 ] Example: pageSize=10 The maximum amount of levels to return |
{- "id": "BTC-USDC",
- "bars": [
- {
- "start": 1665979200,
- "end": 1665979260,
- "openPrice": 19180.63,
- "closePrice": 19172.32,
- "highPrice": 19181.84,
- "lowPrice": 19171.8,
- "baseVolume": 71.55,
- "quoteVolume": 1372329
}, - {
- "start": 1665979260,
- "end": 1665979320,
- "openPrice": 19172.32,
- "closePrice": 19162.98,
- "highPrice": 19183.74,
- "lowPrice": 19161.55,
- "baseVolume": 124.74,
- "quoteVolume": 2391296.985
}
]
}
Returns statistics and dynamic data for a particular market.
marketId required | string (MarketId) Example: BTC-USDC Market identification or name |
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 |
{- "id": "BTC-USDC",
- "priceGrouping": 2.345,
- "bids": [
- {
- "price": "26258.82",
- "volume": "string"
}
], - "asks": [
- {
- "price": "26258.82",
- "volume": "string"
}
]
}
Returns latest trades data for a particular market.
marketId required | string (MarketId) Example: BTC-USDC Market identification or name |
pageSize | integer (Count) [ 1 .. 100 ] Example: pageSize=10 The maximum amount of trades to return |
[- {
- "fillId": "12313546546",
- "marketId": "BTC-USDC",
- "buyOrderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "sellOrderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "tradeOn": 0,
- "tradeBaseAmount": "string",
- "tradeQuoteAmount": "string",
- "tradeBuyFees": "string",
- "tradeSellFees": "string",
- "tradeBuyBorrow": "string",
- "tradeBuyRepay": "string",
- "tradeSellBorrow": "string",
- "tradeSellRepay": "string",
- "tradePrice": "string",
- "buyOrderCompleted": true,
- "sellOrderCompleted": true,
- "buyOrderIsTaker": true,
- "status": "PENDING"
}
]
Returns the full order book aggregated by price. Please use this in conjunction with websocket delta feed to keep an updated order book
marketId required | string (MarketId) Example: BTC-USDC Market identification or name |
pageSize | integer (Count) [ 1 .. 100 ] Example: pageSize=10 The maximum amount of levels to return |
{- "id": "BTC-USDC",
- "priceGrouping": 2.345,
- "bids": [
- {
- "price": "26258.82",
- "volume": "string"
}
], - "asks": [
- {
- "price": "26258.82",
- "volume": "string"
}
]
}
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.
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:
|
address required | string Blockchain Public Address |
{- "code": "string",
- "message": "string"
}
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.
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:
|
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) |
{- "chainId": 1,
- "address": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "signature": "string",
- "ephemeralData": {
- "address": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "signature": "string",
- "expiresOn": 0
}
}
{- "userId": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "accountId": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "token": "Bearer ABC123",
- "firstLogin": true,
- "encryptionKey": "string"
}
Returns static data for a particular account.
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. |
{- "id": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "owner": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "wallet": {
- "chain": 1,
- "address": "0xa61BB243CF00Cd407ffAE11FDc51f5976cd2382D"
}, - "createdOn": 0
}
Returns limits information for a particular maket for this account. Note: in future versiones the user should be able to reduce their limits explicitly.
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 |
{- "maxBuyOrderSize": "string",
- "maxSellOrderSize": "string",
- "buyAvailableCash": "string",
- "sellAvailableCash": "string",
- "buyPoolBalance": "string",
- "sellPoolBalance": "string"
}
Returns trades made by this account for a particular market.
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 |
offset | number |
pageSize | integer (Count) [ 1 .. 100 ] 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. |
[- {
- "fillId": "12313546546",
- "marketId": "BTC-USDC",
- "buyOrderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "sellOrderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "tradeOn": 0,
- "tradeBaseAmount": "string",
- "tradeQuoteAmount": "string",
- "tradeBuyFees": "string",
- "tradeSellFees": "string",
- "tradeBuyBorrow": "string",
- "tradeBuyRepay": "string",
- "tradeSellBorrow": "string",
- "tradeSellRepay": "string",
- "tradePrice": "string",
- "buyOrderCompleted": true,
- "sellOrderCompleted": true,
- "buyOrderIsTaker": true,
- "status": "PENDING",
- "accountSide": "BUYER"
}
]
Returns orders created by this account for a particular market.
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 |
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 |
[- {
- "id": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "newOrderData": {
- "marketId": "BTC-USDC",
- "type": "limit",
- "side": "buy",
- "size": "string",
- "settlementTicket": {
- "account": "AQIDBAECAwQBAgMEAQIDBAECAwQBAgMEAQIDBAECAwQ=",
- "creator": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "buySlotId": 1,
- "buyAmount": "string",
- "sellSlotId": 1,
- "sellAmount": "string",
- "maxBuyAmountToPool": "string",
- "maxSellAmountFromPool": "string",
- "nonce": 0,
- "expiresOn": 0,
- "signature": "string"
}, - "price": "26258.82",
- "sentTime": 0,
- "clientOrderId": "862f572b-769b-41b6-9b9b-ac470c5d9bbb"
}, - "openOrderData": {
- "remainingAmount": "string",
- "locked": "string",
- "status": "Pending"
}, - "trades": [
- {
- "fillId": "12313546546",
- "marketId": "BTC-USDC",
- "buyOrderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "sellOrderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "tradeOn": 0,
- "tradeBaseAmount": "string",
- "tradeQuoteAmount": "string",
- "tradeBuyFees": "string",
- "tradeSellFees": "string",
- "tradeBuyBorrow": "string",
- "tradeBuyRepay": "string",
- "tradeSellBorrow": "string",
- "tradeSellRepay": "string",
- "tradePrice": "string",
- "buyOrderCompleted": true,
- "sellOrderCompleted": true,
- "buyOrderIsTaker": true,
- "status": "PENDING"
}
], - "cancelOrderTicket": {
- "account": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "creator": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "orderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "haveId": "BTC",
- "haveAmount": "string",
- "cancelOn": 0,
- "refundRequest": "string"
}, - "makerFees": "string",
- "takerFees": "string",
- "addedOn": 0
}
]
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.
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 |
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 |
{- "marketId": "BTC-USDC",
- "type": "limit",
- "side": "buy",
- "price": 19175.5,
- "size": 1,
- "settlementTicket": {
- "account": "4NBVMUVACZHLKXTU4WHGULXRPSYKR5MCRZ3FUVUGIJTVJBCL5GTUUUWHGM",
- "creator": "733BHFUPQ5BNKM6C3COBUSZVV5FVQHRNPKG7WQBQ4XNVA3WSCKBPGKVQXI",
- "buySlotId": 1,
- "buyAmount": 100000000,
- "sellSlotId": 2,
- "sellAmount": 19271377500,
- "maxBuyAmountToPool": 0,
- "maxSellAmountFromPool": 0,
- "expiresOn": 1667101802,
- "nonce": 16671018020000,
- "signature": "0xbe609aee343fb3c4b28e1df9e632fca64fcfaede20f02e86244efddf30957bd2"
}, - "sentTime": 1667187723000000,
- "clientOrderId": "8e9fe0b1-abe2-47ec-b851-c2f45c0c06aa"
}
[- {
- "id": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ="
}
]
Allow the user to cancel all market orders
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 |
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 |
[- null
]
Allow the user to cancel multiple open orders
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. |
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 |
[- null
]
Initializes a deposit operation.
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) Instrument identification or name |
amount required | string (Quantity) |
repayAmount required | string (Quantity) |
note | string |
algorandSignedFundingTransaction required | string (AlgorandSignedTransaction) |
{- "instrumentId": "BTC",
- "amount": "string",
- "repayAmount": "string",
- "note": "string",
- "wormholeVAA": "string",
- "overrideOriginChain": 1,
- "overrideOriginAddress": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a withdraw operation.
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. |
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 |
{- "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
- "lastValid": 30628460,
- "signature": "string",
- "amount": "string",
- "instrumentId": "BTC",
- "maxBorrow": "string",
- "maxFees": "string",
- "destination": {
- "chain": "ethereum",
- "address": "0xa61BB243CF00Cd407ffAE11FDc51f5976cd2382D"
}, - "solanaOwnerAddress": "6qp77EKaaJXEk2pEg4pNjJSfYepgZMxNjM9jX6Ke3VEG"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a lend operation.
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 |
lease required | string (Lease) Random 32 bytes number encoded in Base64 string |
lastValid required | number |
signature required | string (Signature) |
amount required | string (Quantity) |
{- "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
- "lastValid": 30628460,
- "signature": "string",
- "amount": "string"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a redeem operation.
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 |
lease required | string (Lease) Random 32 bytes number encoded in Base64 string |
lastValid required | number |
signature required | string (Signature) |
amount required | string (Quantity) |
{- "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
- "lastValid": 30628460,
- "signature": "string",
- "amount": "string"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a borrow operation.
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 |
lease required | string (Lease) Random 32 bytes number encoded in Base64 string |
lastValid required | number |
signature required | string (Signature) |
amount required | string (Quantity) |
{- "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
- "lastValid": 30628460,
- "signature": "string",
- "amount": "string"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a repay operation.
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 |
lease required | string (Lease) Random 32 bytes number encoded in Base64 string |
lastValid required | number |
signature required | string (Signature) |
amount required | string (Quantity) |
{- "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
- "lastValid": 30628460,
- "signature": "string",
- "amount": "string"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a liquidation operation.
accountId required | string (AccountId) Example: C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS The liquidator account |
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. |
{- "lease": "y1vC8jXwAlPEJccvS4v884/uvJj5tJc6bucKayD5P8M=",
- "lastValid": 30628460,
- "signature": "string",
- "liabilityBasket": [
- [
- {
- "instrumentId": "BTC",
- "amount": "0.1201"
}, - {
- "instrumentId": "ETH",
- "amount": "-2.4545"
}
]
], - "assetBasket": [
- [
- {
- "instrumentId": "BTC",
- "amount": "0.1201"
}, - {
- "instrumentId": "ETH",
- "amount": "-2.4545"
}
]
], - "target": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Initializes a refund operation.
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. |
required | object (CancelOrderTicket) |
signature required | string (Signature) |
{- "ticket": {
- "account": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "creator": "24AV37GGIROGSNBHH655DQAOQ75FBIVD2GSYGFV3ULEH3OYNQJWHKMQTEE",
- "orderId": "I0mJdYc0aShzRZgnNFlyNAlYcjmEVyk0dZKDRTQ0NDQ=",
- "haveId": "BTC",
- "haveAmount": "string",
- "cancelOn": 0,
- "refundRequest": "string"
}, - "signature": "string"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Adds permissions to a user.
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. |
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 |
{- "name": "string",
- "delegatedTo": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "expiresOn": 0,
- "nonce": 0,
- "signature": "string"
}
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Revokes permissions from an account.
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. |
id required | string (DelegationId) Example: id=1345344 Delegation identification. |
{- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc="
}
Returns accounts and permissions.
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. |
[- {
- "id": "1345344",
- "name": "string",
- "delegatedTo": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "expiresOn": 0,
- "createdOn": 0,
- "lastUsedOn": 0,
- "revokedOn": 0
}
]
Returns current balance for this account.
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. |
{- "portfolioOverview": {
- "value": "string",
- "availableMargin": "string",
- "buyingPower": "string",
- "health": "string",
- "leverage": "string",
- "adjustedMaintenanceMargin": "string",
- "maintenanceMarginSupport": 3232.00000001,
- "maintenanceMarginRequirement": 3232.00000001,
- "initialMarginSupport": 3232.00000001,
- "initialMarginRequirement": 3232.00000001
}, - "instrumentsInfo": [
- {
- "instrumentId": "BTC",
- "availableCash": "string",
- "lockedCash": "string",
- "maxBorrow": "string",
- "maxLend": "string",
- "maxWithdraw": "string",
- "maxWithdrawWithBorrow": "string",
- "cash": "string",
- "poolPosition": "string",
- "shortfall": "string"
}
]
}
Returns operations related to this account.
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. |
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 |
[- {
- "id": "OGKhmSE5rr+R2cx31/wNt5TaxYIYECWMlOvIkLwqjFc=",
- "type": "deposit",
- "status": "pending",
- "groupId": "string",
- "instrumentId": "BTC",
- "amount": "string",
- "createdOn": 0,
- "extraInfo": {
- "repayAmount": "string",
- "origin": {
- "chain": 1,
- "address": "0xa61BB243CF00Cd407ffAE11FDc51f5976cd2382D"
}
}
}
]
Returns the lists of all the account which are in state of liquidation. Balances are also included
{- "prices": [
- [
- {
- "id": "BTC",
- "price": "25653.12"
}, - {
- "id": "ETH",
- "price": "1500.45"
}
]
], - "accounts": [
- {
- "accountId": "C3_L6VD42QWIR2ESDCZKY7B7TIYVSZNLKKLNHFODICR35B4YPOULFK6USCS",
- "health": "-25.45",
- "cash": [
- [
- {
- "instrumentId": "BTC",
- "amount": "0.1201"
}, - {
- "instrumentId": "ETH",
- "amount": "-2.4545"
}
]
], - "pool": [
- [
- {
- "instrumentId": "BTC",
- "amount": "0.1201"
}, - {
- "instrumentId": "ETH",
- "amount": "-2.4545"
}
]
]
}
]
}