REST API
Base URL: https://v4-api.dev.parcllabs.com
All responses are JSON. Prices use 8 decimal places, sizes use 6, collateral (USDC) uses 6.
Markets
GET /v1/markets
Returns all markets.
curl https://v4-api.dev.parcllabs.com/v1/markets[
{
"marketId": 0,
"name": "NYC",
"oraclePrice": "58035000000",
"markPrice": "58177000000",
"openInterestLong": "37460000",
"openInterestShort": "37460000",
"maxOpenInterest": "1000000000",
"fundingRate": "-15800",
"lastFundingTimestamp": 1712345678,
"fundingIntervalSecs": 3600,
"makerFeeBps": 0,
"takerFeeBps": 0,
"initialMarginRatioBps": 1000,
"maintenanceMarginRatioBps": 500,
"oracleValidUntil": 1712433900,
"status": "Active",
"tickSize": "1000000"
}
]GET /v1/markets/{id}
Returns a single market by ID.
GET /v1/markets/{id}/orderbook
{
"bids": [
{ "price": "58100000000", "size": "500000" },
{ "price": "58050000000", "size": "1200000" }
],
"asks": [
{ "price": "58200000000", "size": "300000" },
{ "price": "58250000000", "size": "800000" }
]
}GET /v1/markets/{id}/funding
Returns funding rate history.
GET /v1/markets/{id}/trades
Returns recent trades.
Accounts
GET /v1/accounts/{id}
{
"accountId": 12,
"owner": "35504e68...",
"mode": "Cross",
"collateral": "21929491932",
"positions": [
{
"marketId": 0,
"side": "Long",
"size": "64560188",
"entryPrice": "58211606845",
"unrealizedPnl": "-120297107",
"cumulativeFunding": "0",
"lastOraclePrice": "58090000000",
"openedAt": 1712345678000
}
],
"openOrders": [],
"createdAt": 1712300000000,
"volume30d": 37581522814
}GET /v1/accounts/by-owner/{pubkey}
Same response as above. Looks up by the owner's hex public key.
GET /v1/accounts/{id}/positions
Returns just the positions array.
GET /v1/accounts/{id}/orders
Returns just the open orders array.
Oracle
GET /v1/oracle/{market_id}
Current oracle state for a market.
{
"price": "58035000000",
"date": 20260406,
"validUntil": 1712433900,
"status": "Active"
}GET /v1/oracle/{market_id}/history
Returns recent oracle price history.
Exchange
GET /v1/insurance-fund
{
"balance": 119059010,
"totalDeposited": 140000000000
}GET /v1/fee-tiers
{
"tier_count": 5,
"tiers": [
{ "min_volume_30d": 0, "maker_fee_bps": -1, "taker_fee_bps": 35 },
{ "min_volume_30d": 10000000000, "maker_fee_bps": -1, "taker_fee_bps": 30 }
]
}GET /v1/node/info
{
"protocol_version": 3,
"binary_version": 3,
"build_tag": "dev",
"block_height": 73000,
"block_timestamp": 1712345678943,
"state_root": "4d419b60..."
}Transactions
POST /v1/tx
Submit a signed transaction. See signing transactions for the full format.
Request body: signed transaction JSON.
Response on success:
{
"status": "success",
"hash": "9dd57899...",
"events": [
{ "type": "Fill", "market_id": 0, "price": "58100000000", "size": "100000", ... }
]
}Response on failure:
{
"status": "failed",
"error": "insufficient margin"
}The events array contains all state changes caused by the transaction — fills, order placements, cancellations, liquidations, etc.
Staking
GET /v1/staking/validators
Returns all registered validators with stake, commission, uptime, and status.
GET /v1/staking/info
Returns network staking stats: total staked, active validators, epoch info, APY.
GET /v1/staking/balance/{pubkey}
Returns the PRCL staking balance for a public key.
GET /v1/staking/delegations/{pubkey}
Returns all delegations by a public key.