Endpoints

🔐 — requires authentication 🪙 — cost of calling in request tokens (see Rate Limits)

Companies

GET /v1/companies

🔐 🪙 1

Fetches all companies registered on the platform.

Parameters:

  • id: Uuid (optional) — filters output by company ID

  • limit: int (optional, max=10,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[Company]

Example output
{
  "result": [
    {
      "created_at": "2024-01-01T18:44:33.846999Z",
      "id": "bdd68c99-65fe-4500-baae-5bc09b4af183",
      "is_lp": true,
      "legal_name": "Example company",
      "short_name": "EXMPL"
    },
    {
      "created_at": "2024-02-01 18:44:51.817012Z",
      "id": "af13119d-4ed1-4718-aea3-fecee4764837",
      "is_lp": false,
      "legal_name": "Another company",
      "short_name": "ANTHR"
    }
  ],
  "pagination": {
    "next_page": null
  }
}

Python SDK:

def get_companies(self, id: Optional[str] = None,
                  page: Optional[Dict] = None) -> ApiPage[Company]
SDK examples
f# iterate over companies
for company in paginate(client.get_companies):
    ...

# load all companies into a list (eagerly request all pages)
companies = list(paginate(client.get_companies))

# fetch company metadata by id
company_id = "bdd68c99-65fe-4500-baae-5bc09b4af183"
company = client.get_companies(id=company_id).result[0]

Portfolio

GET /v1/portfolio/assets

🔐 🪙 1

Fetches current asset balances for the authenticated user.

Parameters:

  • pool: Uuid (optional) — filters output by settlement pool; if not specified, a summary across all settlement pools is returned

  • limit: int (optional, max=10,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[Asset]

Example output
{
  "result": [
    {
      "asset": "USDC",
      "company": "bdd68c99-65fe-4500-baae-5bc09b4af183",
      "pool_location": "cdfbea44-7e75-4688-a3ea-e8d097ae7ede",
      "qty": "2103.191818"
    }
  ]
  "pagination": {
    "next_page": null
  }
}

Python SDK:

def get_portfolio_assets(self, pool: Optional[str] = None,
                         page: Optional[Dict] = None) -> ApiPage[Asset]
SDK examples
# iterate over all assets
for assets in paginate(client.get_portfolio_assets):
    ...

# load all assets in a specific pool into a list (eagerly request all pages)
pool_id = "cdfbea44-7e75-4688-a3ea-e8d097ae7ede"
assets = list(paginate(client.get_portfolio_assets, pool=pool_id))

GET /v1/portfolio/positions

🔐 🪙 1

Fetches current position balances for the authenticated user.

Parameters:

  • pool: Uuid (optional) — filters output by settlement pool; if not specified, a summary across all settlement pools is returned

  • limit: int (optional, max=10,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[Position]

Example output
{
  "result": [
    {
      "avg_entry_price": "65215.000000000000",
      "company": "af13119d-4ed1-4718-aea3-fecee4764837",
      "instrument": {
        "expiry": "2024-04-05T08:00:00Z",
        "instrument_type": "dated_future",
        "settlement_asset": "USDC",
        "underlying": "BTC"
      },
      "pool_location": "cdfbea44-7e75-4688-a3ea-e8d097ae7ede",
      "qty": "1",
      "taker_qty": "0",
      "updated_at": "2024-04-02T23:16:52.344386Z"
    }
  ],
  "pagination": {
    "next_page": null
  }
}

Python SDK:

def get_portfolio_positions(self, pool: Optional[str] = None,
                            page: Optional[Dict] = None) -> ApiPage[Position]
SDK examples
# iterate over positions in a specific settlement pool
pool_id = "cdfbea44-7e75-4688-a3ea-e8d097ae7ede"
for positions in paginate(client.get_portfolio_positions, pool=pool_id):
    ...

# load all your positions into a list (eagerly request all pages)
positions = list(paginate(client.get_portfolio_positions))

GET /v1/portfolio/positions/aggregated

🔐 🪙 10

Fetches aggregated positions for the authenticated user.

Parameters:

  • limit: int (optional, max=10,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[AggregatedPosition]

Example output
{
  "result": [
    {
      "iv": "0",
      "notional": "65833.1739032583",
      "position_info": {
        "avg_entry_price": "65215",
        "company": "af13119d-4ed1-4718-aea3-fecee4764837",
        "instrument": {
          "expiry": "2024-04-05T08:00:00Z",
          "instrument_type": "dated_future",
          "settlement_asset": "USDC",
          "underlying": "BTC"
        },
        "pool_location": "00000000-0000-0000-0000-000000000000",
        "qty": "1",
        "taker_qty": "0",
        "updated_at": "2024-04-02T23:16:52.344386Z"
      },
      "price": "65896.65104296",
      "sum_delta": "1",
      "sum_gamma": "0",
      "sum_rho": "0",
      "sum_theta": "0",
      "sum_vega": "0",
      "underlying_price": "65833.1739032583",
      "upnl": "681.65104296"
    }
  ],
  "pagination": {
    "next_page": null
  },
}

Python SDK:

def get_portfolio_aggregated_positions(self, page: Optional[Dict] = None) \
    -> ApiPage[AggregatedPosition]
SDK examples
# iterate over your company's aggregated positions
for positions in paginate(client.get_portfolio_aggregated_positions):
    ...

# load all your aggregated positions into a list (eagerly request all pages)
positions = list(paginate(client.get_portfolio_aggregated_positions))

GET /v1/portfolio/trades

🔐 🪙 1

Fetches trades for the authenticated user.

Parameters:

  • pool: Uuid (optional) — filters output by settlement pool

  • id: Uuid (optional) — filters output by trade ID

  • limit: int (optional, max=10,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[Trade]

Example output
{
  "result": [
    {
      "company": "af13119d-4ed1-4718-aea3-fecee4764837",
      "created_at": "2024-04-02T23:16:52.344386Z",
      "id": "01efd105-07d7-43d9-9f51-886af0aa8b25",
      "instrument": {
        "expiry": "2024-04-05T08:00:00Z",
        "instrument_type": "dated_future",
        "settlement_asset": "USDC",
        "underlying": "BTC"
      },
      "pool_location": "cdfbea44-7e75-4688-a3ea-e8d097ae7ede",
      "price": "65215",
      "qty": "1",
      "role": "maker",
      "side": "buy",
      "source_quote": "adb18efb-aee3-4c0f-9e96-082c2849601d",
      "source_rfq": "564eeecb-7466-4af4-b833-907835d6e83b",
      "source_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade",
      "trade_type": "trade"
    }
  ],
  "pagination": {
    "next_page": null
  }
}

Python SDK:

def get_portfolio_trades(self, pool: Optional[str] = None, id: Optional[str] = None,
                         page: Optional[Dict] = None) -> ApiPage[Trade]
SDK examples
# iterate over trades in a specific settlement pool
pool_id = "cdfbea44-7e75-4688-a3ea-e8d097ae7ede"
for trade in paginate(client.get_portfolio_trades, pool=pool_id):
    ...

# fetch a trade by id
trade_id = "01efd105-07d7-43d9-9f51-886af0aa8b25"
trade = client.get_portfolio_trades(id=trade_id).result[0]

GET /v1/portfolio/summary

🔐 🪙 10

Fetches the aggregated summary of the authenticated user's positions: balance, uPNL and the Greeks (risk).

Parameters: None.

Output type: ApiSingle[PortfolioSummary]

Example output
{
  "result": {
    "sum_balance": "1169.5439289533",
    "sum_delta": "1",
    "sum_dollar_delta": "65660.2180115883",
    "sum_dollar_gamma": "0",
    "sum_gamma": "0",
    "sum_notional": "65660.2180115883",
    "sum_rho": "0",
    "sum_theta": "0",
    "sum_upnl": "529.6761819533",
    "sum_vega": "0"
  }
}

Python SDK:

def get_portfolio_summary(self) -> ApiSingle[PortfolioSummary]
SDK examples
summary = client.get_portfolio_summary().result

Quotes

GET /v1/quotes, GET /v1/quotes/sent and GET /v1/quotes/received

🔐 🪙 1

Fetches quotes sent or received by the authenticated user.

Parameters:

  • id: Uuid (optional) — filters output by quote ID

  • limit: int (optional, max=1,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[Quote]

Example output
{
  "result": [
    {
      "aggregated_ask": null,
      "aggregated_bid": "65215",
      "clearing_events": [
        {
          "created_at": "2024-04-02T22:52:46.609140Z",
          "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
          "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
          "status": "pending_pool_creation",
          "taker_side": "sell"
        },
        {
          "created_at": "2024-04-02T22:55:34.122263Z",
          "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
          "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
          "status": "pending_taker_deposit_approval",
          "taker_side": null
        }
      ],
      "clearing_status": "pending_taker_deposit_approval",
      "client_quote_id": "my quote 2",
      "creator_params": {
        "margin_mode": "simple",
        "params": {
          "asset_params": {},
          "auto_liquidation": true,
          "default_asset_param": {
            "futures_initial_margin": "0.02",
            "futures_leverage": "20000",
            "futures_maintenance_margin": "0.01",
            "option_initial_margin": "0.15",
            "option_initial_margin_min": "0.1",
            "option_maintenance_margin": "0.075"
          },
          "liquidation_penalty": "0.1"
        }
      },
      "expires_at": "2024-04-03T10:49:20.685499Z",
      "maker_company": "af13119d-4ed1-4718-aea3-fecee4764837",
      "new_pool_name": "API test pool",
      "other_params": {
        "margin_mode": "simple",
        "params": {
          "asset_params": {},
          "auto_liquidation": true,
          "default_asset_param": {
            "futures_initial_margin": "0.02",
            "futures_leverage": "20000",
            "futures_maintenance_margin": "0.01",
            "option_initial_margin": "0.15",
            "option_initial_margin_min": "0.1",
            "option_maintenance_margin": "0.075"
          },
          "liquidation_penalty": "0.1"
        }
      },
      "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
      "per_leg_quotes": [
        {
          "ask": null,
          "bid": "65215",
          "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade"
        }
      ],
      "pool_location": "cdfbea44-7e75-4688-a3ea-e8d097ae7ede",
      "target_rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b"
    }
  ],
  "pagination": {
    "next_page": null
  }
}

Python SDK:

def get_quotes(self, id: Optional[str] = None,
               page: Optional[Dict] = None) -> ApiPage[Quote]

def get_quotes_sent(self, id: Optional[str] = None,
                    page: Optional[Dict] = None) -> ApiPage[Quote]
    
def get_quotes_received(self, id: Optional[str] = None,
                        page: Optional[Dict] = None) -> ApiPage[Quote]
SDK examples
# iterate over all of your company's sent quotes
for quote in paginate(client.get_quotes_sent):
    ...

# fetch a received quote by id
quote_id = "5368f58e-f385-44cc-a9e5-2e8ea51913bb"
quote = client.get_quotes_received(id=quote_id).result[0]

POST /v1/quotes/new

🔐 🪙 20

Used to submit a quote in response to a particular RFQ as a maker.

JSON payload keys:

  • rfq_id: Uuid — ID of the target RFQ

  • expires_at: DateTimeRFC3339 — expiration time

  • leg_quotes: List[LegQuote] — quotes for individual RFQ legs

  • pool_strategy: PoolStrategy — reuse an existing pool or create a new one

  • client_quote_id: str (optional, max length: 50 characters) — arbitrary string for your internal reference

Example input
{
  "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
  "expires_at": "2024-04-03T10:45:24.967356Z",
  "leg_quotes": [
    {
      "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade",
      "bid": "65220"
    }
  ],
  "pool_strategy": {
    "strategy": "create_new",
    "name": "API test pool",
    "creator_params": {
      "margin_mode": "simple",
      "params": {
        "liquidation_penalty": "0.1",
        "auto_liquidation": true,
        "asset_params": {},
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_maintenance_margin": "0.01",
          "futures_leverage": "20000",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        }
      }
    },
    "other_params": {
      "margin_mode": "simple",
      "params": {
        "liquidation_penalty": "0.1",
        "auto_liquidation": true,
        "asset_params": {},
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_maintenance_margin": "0.01",
          "futures_leverage": "20000",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        }
      }
    }
  },
  "client_quote_id": "my quote"
}

Output type: ApiSingle[Quote]

Example output
{
  "result": {
    "aggregated_ask": null,
    "aggregated_bid": "65220",
    "clearing_events": [],
    "clearing_status": null,
    "client_quote_id": "my quote",
    "creator_params": {
      "margin_mode": "simple",
      "params": {
        "asset_params": {},
        "auto_liquidation": true,
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_leverage": "20000",
          "futures_maintenance_margin": "0.01",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        },
        "liquidation_penalty": "0.1"
      }
    },
    "expires_at": "2024-04-03T10:45:24.967356Z",
    "maker_company": "af13119d-4ed1-4718-aea3-fecee4764837",
    "new_pool_name": "API test pool",
    "other_params": {
      "margin_mode": "simple",
      "params": {
        "asset_params": {},
        "auto_liquidation": true,
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_leverage": "20000",
          "futures_maintenance_margin": "0.01",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        },
        "liquidation_penalty": "0.1"
      }
    },
    "parent_quote_id": "37dac6e5-8f91-4cef-9e1e-53042e30991a",
    "per_leg_quotes": [
      {
        "ask": null,
        "bid": "65220",
        "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade"
      }
    ],
    "pool_location": null,
    "target_rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b"
  }
}

Python SDK:

def create_quote(self, rfq_id: UUIDv4, expires_at: DateTimeRFC3339,
                 leg_quotes: List[LegQuote], pool_strategy: PoolStrategy,
                 client_quote_id: Optional[str] = None) -> ApiSingle[Quote]
SDK examples
margin_params = {
    "margin_mode": MarginMode.SIMPLE,
    "params": {
        "liquidation_penalty": "0.1",
        "auto_liquidation": True,
        "asset_params": {},
        "default_asset_param": {
            "futures_initial_margin": "0.02",
            "futures_maintenance_margin": "0.01",
            "futures_leverage": "20000",
            "option_initial_margin": "0.15",
            "option_initial_margin_min": "0.1",
            "option_maintenance_margin": "0.075",
        },
    }
}
new_quote = maker_client.create_quote(
    rfq_id="564eeecb-7466-4af4-b833-907835d6e83b",
    expires_at="2024-04-03T10:45:24.967356Z",
    client_quote_id="my quote",
    leg_quotes=[
        {
            "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade",
            "bid": "65220"
        }
    ],
    pool_strategy={
        "strategy": PoolStrategyType.CREATE_NEW,
        "name": "API test pool",
        "creator_params": margin_params,
        "other_params": margin_params
    }
).result

POST /v1/quotes/cancel

🔐 🪙 20

Cancels a previously created quote.

JSON payload keys:

  • id: Uuid — ID of the quote to cancel

Example input
{
  "id": "37dac6e5-8f91-4cef-9e1e-53042e30991a"
}

Output type: ApiSingle[bool]

Example output
{
  "result": true
}

Python SDK:

def cancel_quote(self, id: UUIDv4) -> ApiSingle[bool]
SDK example
client.cancel_quote(id="3025fca3-114e-4476-a993-93286a7dd43f")

POST /v1/quotes/cancel_all

🔐 🪙 20

Cancels all of the authenticated user's outstanding quotes.

Output type: ApiSingle[bool]

Example output
{
  "result": true
}

Python SDK:

def cancel_all_quotes(self) -> ApiSingle[bool]
SDK examples
client.cancel_all_quotes()

POST /v1/quotes/replace

🔐 🪙 20

Used to cancel an existing quote and submit a new one for the same particular RFQ.

JSON payload keys:

  • parent_quote_id: Uuid — ID of the existing quote to cancel

  • rfq_id: Uuid — ID of the target RFQ

  • expires_at: DateTimeRFC3339 — expiration time

  • leg_quotes: List[LegQuote] — quotes for individual RFQ legs

  • pool_strategy: PoolStrategy — reuse an existing pool or create a new one

  • client_quote_id: str (optional) — arbitrary string for your internal reference

Example input
{
  "parent_quote_id": "37dac6e5-8f91-4cef-9e1e-53042e30991a",
  "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
  "expires_at": "2024-04-03T10:49:20.685499Z",
  "leg_quotes": [
    {
      "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade",
      "bid": "65215"
    }
  ],
  "pool_strategy": {
    "strategy": "create_new",
    "name": "API test pool",
    "creator_params": {
      "margin_mode": "simple",
      "params": {
        "liquidation_penalty": "0.1",
        "auto_liquidation": true,
        "asset_params": {},
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_maintenance_margin": "0.01",
          "futures_leverage": "20000",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        }
      }
    },
    "other_params": {
      "margin_mode": "simple",
      "params": {
        "liquidation_penalty": "0.1",
        "auto_liquidation": true,
        "asset_params": {},
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_maintenance_margin": "0.01",
          "futures_leverage": "20000",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        }
      }
    }
  },
  "client_quote_id": "my quote 2"
}

Output type: ApiSingle[Quote]

Example output
{
  "result": {
    "aggregated_ask": null,
    "aggregated_bid": "65215",
    "clearing_events": [],
    "clearing_status": null,
    "client_quote_id": "my quote 2",
    "creator_params": {
      "margin_mode": "simple",
      "params": {
        "asset_params": {},
        "auto_liquidation": true,
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_leverage": "20000",
          "futures_maintenance_margin": "0.01",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        },
        "liquidation_penalty": "0.1"
      }
    },
    "expires_at": "2024-04-03T10:49:20.685499Z",
    "maker_company": "af13119d-4ed1-4718-aea3-fecee4764837",
    "new_pool_name": "API test pool",
    "other_params": {
      "margin_mode": "simple",
      "params": {
        "asset_params": {},
        "auto_liquidation": true,
        "default_asset_param": {
          "futures_initial_margin": "0.02",
          "futures_leverage": "20000",
          "futures_maintenance_margin": "0.01",
          "option_initial_margin": "0.15",
          "option_initial_margin_min": "0.1",
          "option_maintenance_margin": "0.075"
        },
        "liquidation_penalty": "0.1"
      }
    },
    "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
    "per_leg_quotes": [
      {
        "ask": null,
        "bid": "65215",
        "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade"
      }
    ],
    "pool_location": null,
    "target_rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b"
  }
}

Python SDK:

def replace_quote(self, parent_quote_id: UUIDv4, rfq_id: UUIDv4,
                  expires_at: DateTimeRFC3339, leg_quotes: List[LegQuote],
                  pool_strategy: PoolStrategy,
                  client_quote_id: Optional[str] = None) -> ApiSingle[Quote]
SDK examples
margin_params = {
    "margin_mode": MarginMode.SIMPLE,
    "params": {
        "liquidation_penalty": "0.1",
        "auto_liquidation": True,
        "asset_params": {},
        "default_asset_param": {
            "futures_initial_margin": "0.02",
            "futures_maintenance_margin": "0.01",
            "futures_leverage": "20000",
            "option_initial_margin": "0.15",
            "option_initial_margin_min": "0.1",
            "option_maintenance_margin": "0.075",
        },
    }
}
new_quote = maker_client.replace_quote(
    parent_quote_id="37dac6e5-8f91-4cef-9e1e-53042e30991a",
    rfq_id="564eeecb-7466-4af4-b833-907835d6e83b",
    expires_at="2024-04-03T10:49:20.685499Z",
    client_quote_id="my quote 2",
    leg_quotes=[
        {
            "target_rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade",
            "bid": "65215"
        }
    ],
    pool_strategy={
        "strategy": PoolStrategyType.CREATE_NEW,
        "name": "API test pool",
        "creator_params": margin_params,
        "other_params": margin_params
    }
).result

POST /v1/quotes/accept

🔐 🪙 20

Used to accept a quote and create a trade as a taker.

JSON payload keys:

  • parent_quote_id: Uuid — ID of the quote to accept

  • rfq_id: Uuid — ID of the target RFQ

  • side: TradeSide — "buy" or "sell"

Example input
{
  "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
  "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
  "side": "sell"
}

Output type: ApiSingle[QuoteAcceptResponse]

Example output
{
  "result": {
    "new_clearing_status": "pending_pool_creation",
    "pending_deposits_sum_qty": "2103.191818",
    "pending_settlement_pool": {
      "company_id": "bdd68c99-65fe-4500-baae-5bc09b4af183",
      "data": {
        "creator_address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
        "creator_company_margin_usage": {
          "balance": "0",
          "company": "bdd68c99-65fe-4500-baae-5bc09b4af183",
          "margin_params": {
            "margin_mode": "simple",
            "params": {
              "asset_params": {},
              "auto_liquidation": true,
              "default_asset_param": {
                "futures_initial_margin": "0.02",
                "futures_leverage": "20000",
                "futures_maintenance_margin": "0.01",
                "option_initial_margin": "0.15",
                "option_initial_margin_min": "0.1",
                "option_maintenance_margin": "0.075"
              },
              "liquidation_penalty": "0.1"
            }
          },
          "margin_usage": {
            "initial_margin": "0",
            "maintenance_margin": "0"
          },
          "max_withdrawable_amount": "0"
        },
        "other_address": "0xa0ee7a142d267c1f36714e4a8f75612f20a79720",
        "other_company_margin_usage": {
          "balance": "0",
          "company": "af13119d-4ed1-4718-aea3-fecee4764837",
          "margin_params": {
            "margin_mode": "simple",
            "params": {
              "asset_params": {},
              "auto_liquidation": true,
              "default_asset_param": {
                "futures_initial_margin": "0.02",
                "futures_leverage": "20000",
                "futures_maintenance_margin": "0.01",
                "option_initial_margin": "0.15",
                "option_initial_margin_min": "0.1",
                "option_maintenance_margin": "0.075"
              },
              "liquidation_penalty": "0.1"
            }
          },
          "margin_usage": {
            "initial_margin": "0",
            "maintenance_margin": "0"
          },
          "max_withdrawable_amount": "0"
        },
        "pool_address": null,
        "pool_name": "API test pool",
        "positions": [],
        "status": "pending"
      },
      "pool_id": "cdfbea44-7e75-4688-a3ea-e8d097ae7ede"
    }
  }
}

Python SDK:

def accept_quote(self, rfq_id: UUIDv4, parent_quote_id: UUIDv4,
                 side: TradeSide) -> ApiSingle[QuoteAcceptResponse]
SDK examples
accepted = taker_client.accept_quote(
    rfq_id="564eeecb-7466-4af4-b833-907835d6e83b",
    parent_quote_id="5368f58e-f385-44cc-a9e5-2e8ea51913bb",
    side=TradeSide.SELL,
).result

Notes On Clearing Status:

Depending on the quote parameters and prior on-chain calls, the trade can be created in one of three distinct clearing states:

  • pending_pool_creation: a new settlement pool needs to be created on-chain; to progress the trade, the taker must execute SettlementPoolFactory.createPool() on-chain, making sure to include rfq_id and parent_quote_id (see Taker Tutorial)

  • pending_taker_deposit_approval: the taker must execute ERC20.approve() on-chain with the settlement pool address as the spender and the amount greater or equal to pending_deposits_sum_qty to progress the trade

  • pending_maker_last_look: the maker is responsible for progressing the trade further by submitting a final "last look" approval

POST /v1/quotes/maker_last_look

🔐 🪙 20

Used by the maker to finalize a trade or cancel it, in response to taker acceptance. The trade must be in pending_maker_last_look clearing status.

JSON payload keys:

  • parent_quote_id: Uuid — ID of the quote

  • rfq_id: Uuid — ID of the RFQ

  • action: RequestAction — "accept" or "reject"

Example input
{
  "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
  "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
  "action": "accept"
}

Output Type: ApiSingle[MakerLastLookResponse]

Example output
{
  "result": {
    "atomic_deposit_details": {
      "creator_address": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266",
      "creator_transfer_amount": "2103.191818",
      "other_address": "0xa0ee7a142d267c1f36714e4a8f75612f20a79720",
      "other_transfer_amount": "639.867747",
      "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
      "pool_address": "0x5e5137b6a596a5d7508756c14d07f83ce8535944",
      "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b"
    },
    "new_clearing_status": "pending_maker_deposit_approval",
    "pending_deposits_sum_qty": "639.867747"
  }
}

Python SDK:

def maker_last_look(self, rfq_id: UUIDv4, parent_quote_id: UUIDv4,
                    action: RequestAction) -> ApiSingle[MakerLastLookResponse]
SDK examples
last_look = maker_client.maker_last_look(
    rfq_id="564eeecb-7466-4af4-b833-907835d6e83b",
    parent_quote_id="5368f58e-f385-44cc-a9e5-2e8ea51913bb",
    action=RequestAction.ACCEPT,
).result

Notes On Clearing Status:

Depending on the current settlement pool margin usage and prior on-chain calls, the trade can end up in one of three distinct clearing states:

  • pending_maker_deposit_approval: the maker must execute ERC20.approve() on-chain with the settlement pool address as the spender and the amount greater or equal to pending_deposits_sum_qty to progress the trade

  • pending_atomic_deposit: the maker must execute SettlementPool.depositUSDCAtomic() on-chain using the settlement pool address as the contract address and the data from atomic_deposit_details as arguments

  • success_trades_booked_into_pool: no additional deposits were necessary for initial margin and the trade has successfully cleared

RFQs

GET /v1/rfqs/sent and GET /v1/rfqs/received

🔐 🪙 10

Fetches RFQs sent or received by the authenticated user.

Parameters:

  • id: Uuid (optional) — filters output by quote ID

  • limit: int (optional, max=1,000) — used for pagination

  • offset: int (optional) — used for pagination

Output type: ApiPage[RFQ]

Example output
{
  "result": [
    {
      "asks": [],
      "bids": [
        {
          "additional_margin_requirements": null,
          "margin_requirements": null,
          "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
          "quote_price": "65215"
        }
      ],
      "created_at": "2024-04-02T22:42:19.816573Z",
      "qty": "1",
      "quotes_common_metadata": {
        "5368f58e-f385-44cc-a9e5-2e8ea51913bb": {
          "clearing_events": [
            {
              "created_at": "2024-04-02T22:52:46.609140Z",
              "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
              "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
              "status": "pending_pool_creation",
              "taker_side": "sell"
            },
            {
              "created_at": "2024-04-02T22:55:34.122263Z",
              "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
              "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
              "status": "pending_taker_deposit_approval",
              "taker_side": null
            }
          ],
          "clearing_status": "pending_taker_deposit_approval",
          "creator_params": {
            "margin_mode": "simple",
            "params": {
              "asset_params": {},
              "auto_liquidation": true,
              "default_asset_param": {
                "futures_initial_margin": "0.02",
                "futures_leverage": "20000",
                "futures_maintenance_margin": "0.01",
                "option_initial_margin": "0.15",
                "option_initial_margin_min": "0.1",
                "option_maintenance_margin": "0.075"
              },
              "liquidation_penalty": "0.1"
            }
          },
          "expires_at": "2024-04-03T10:49:20.685499Z",
          "maker_company": "af13119d-4ed1-4718-aea3-fecee4764837",
          "new_pool_name": "API test pool",
          "other_params": {
            "margin_mode": "simple",
            "params": {
              "asset_params": {},
              "auto_liquidation": true,
              "default_asset_param": {
                "futures_initial_margin": "0.02",
                "futures_leverage": "20000",
                "futures_maintenance_margin": "0.01",
                "option_initial_margin": "0.15",
                "option_initial_margin_min": "0.1",
                "option_maintenance_margin": "0.075"
              },
              "liquidation_penalty": "0.1"
            }
          },
          "parent_quote_id": "5368f58e-f385-44cc-a9e5-2e8ea51913bb",
          "pool_creator_company": "bdd68c99-65fe-4500-baae-5bc09b4af183",
          "pool_creator_params": {
            "margin_mode": "simple",
            "params": {
              "asset_params": {},
              "auto_liquidation": true,
              "default_asset_param": {
                "futures_initial_margin": "0.02",
                "futures_leverage": "20000",
                "futures_maintenance_margin": "0.01",
                "option_initial_margin": "0.15",
                "option_initial_margin_min": "0.1",
                "option_maintenance_margin": "0.075"
              },
              "liquidation_penalty": "0.1"
            }
          },
          "pool_location": "cdfbea44-7e75-4688-a3ea-e8d097ae7ede",
          "pool_other_company": "af13119d-4ed1-4718-aea3-fecee4764837",
          "pool_other_params": {
            "margin_mode": "simple",
            "params": {
              "asset_params": {},
              "auto_liquidation": true,
              "default_asset_param": {
                "futures_initial_margin": "0.02",
                "futures_leverage": "20000",
                "futures_maintenance_margin": "0.01",
                "option_initial_margin": "0.15",
                "option_initial_margin_min": "0.1",
                "option_maintenance_margin": "0.075"
              },
              "liquidation_penalty": "0.1"
            }
          }
        }
      },
      "rfq_expires_at": "2024-04-03T10:42:19.795911Z",
      "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
      "rfq_legs": [
        {
          "instrument": {
            "expiry": "2024-04-05T08:00:00Z",
            "instrument_type": "dated_future",
            "settlement_asset": "USDC",
            "underlying": "BTC"
          },
          "qty": "1",
          "rfq_id": "564eeecb-7466-4af4-b833-907835d6e83b",
          "rfq_leg_id": "635976ac-d5ea-4f44-b25a-2de18cc0cade",
          "side": "buy"
        }
      ],
      "rfq_status": "closed",