Exchange Protocols

Nefarious tracks on-chain exchange positions — open limit orders, scheduled DCA flows, and pre-market OTC trades. The schema surfaces what's locked, what's been filled, and what's still pending, so portfolio views and exposure calculations don't double-count tokens that have already left the wallet for an order.

Limit orders

On-chain limit orders with partial-fill state — locked input, filled output, expiry

DCA schedules

Recurring buy/sell flows with remaining balance, period, next-fill time

Pre-market & OTC

Open positions on pre-market points/allocations and OTC markets

Position Types

FieldTypeDescription
liquidityLocked tokens behind an open limit order, active DCA schedule, or OTC market position

Enriched Fields

Field availability depends on the source. Limit orders surface input/output sides and fill progress; DCA schedules surface period and next-execution time; OTC positions surface counterparty and settlement details.

FieldTypeDescription
sidestringbuy or sell for limit orders / DCA
inputMintstringMint of the token being sold
outputMintstringMint of the token being bought
originalAmountstringInitial size of the order (raw, in input-token units)
remainingAmountstringAmount still locked (raw, in input-token units) — diff with originalAmount = filled
limitPricenumberTrigger price for limit orders
expiresAtstringISO 8601 expiry timestamp, if set
periodSecondsnumberFor DCA: interval between executions
nextExecutionAtstringFor DCA: ISO 8601 timestamp of the next scheduled fill
marketTypestringFor OTC: points, allocation, pre-market token, etc.
Note:

Tokens locked behind open orders are intentionally not counted as wallet balance — they appear under the order position. This avoids double-counting when summing portfolio exposure: an unfilled limit order to sell SOL → USDC shows the SOL as locked liquidity, not as both an SOL balance and a pending fill.

Response Example — Limit order

A partially filled on-chain limit order. originalAmount minus remainingAmount is what's been filled so far; valueUsd reflects the remaining locked side at current prices.

{
"protocol": {
"id": "<protocol-id>",
"name": "<Protocol Name>",
"url": "https://...",
"category": "exchange"
},
"totalValueUsd": 7500.00,
"totalDepositedUsd": 7500.00,
"totalBorrowedUsd": 0,
"positions": [
{
"id": "<protocol-id>-order-<id>",
"type": "liquidity",
"name": "SOL → USDC Limit Sell",
"valueUsd": 7500.00,
"tokens": [
{
"mint": "So11111111111111111111111111111111111111112",
"symbol": "SOL",
"amount": "50000000000",
"amountUsd": 7500.00,
"decimals": 9
}
],
"metadata": {
"side": "sell",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"originalAmount": "80000000000",
"remainingAmount": "50000000000",
"limitPrice": 165.00,
"expiresAt": "2026-06-01T00:00:00Z"
}
}
]
}

Response Example — DCA schedule

{
"id": "<dca-id>",
"type": "liquidity",
"name": "USDC → SOL DCA",
"valueUsd": 4200.00,
"tokens": [
{
"symbol": "USDC",
"amount": "4200000000",
"amountUsd": 4200.00,
"decimals": 6
}
],
"metadata": {
"side": "buy",
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"outputMint": "So11111111111111111111111111111111111111112",
"originalAmount": "6000000000",
"remainingAmount": "4200000000",
"periodSeconds": 86400,
"nextExecutionAt": "2026-05-12T00:00:00Z"
}
}

Response Example — OTC / pre-market

{
"id": "<otc-id>",
"type": "liquidity",
"name": "Pre-market Position",
"valueUsd": 1500.00,
"tokens": [
{
"symbol": "USDC",
"amount": "1500000000",
"amountUsd": 1500.00,
"decimals": 6
}
],
"metadata": {
"marketType": "pre-market token",
"expiresAt": "2026-07-01T00:00:00Z"
}
}

Looking for a specific exchange protocol?

The exhaustive list of indexed limit-order, DCA and OTC venues is shared with active customers. Book a call and we'll confirm coverage (and ship the integration if it's missing).

Ready to start building?

Get your API key in seconds. Free tier included.

Get Started — free

No credit card required