Skip to main content
Skip to main content

API Reference

warning

The Silhouette API and SDK are in beta. We are actively adding new operations.

This section provides detailed documentation for each available API operation. All operations use the same endpoint with different operation values in the request body. For an overview of how the API works, see the API Overview.

Public Operations

Public operations do not require a bearer token. Use these operations to authenticate, check public service metadata, and discover supported tokens and markets.

login

Authenticate with the Silhouette API using Sign-In With Ethereum (SIWE) to obtain a bearer token. This operation does not require an existing bearer token - it's the first step in using the API.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Not required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "login"
messagestringYesThe SIWE message to verify. Must include the statement "Sign in with Ethereum to the app."
signaturestringYesThe cryptographic signature of the SIWE message, signed with your wallet's private key
primaryAddressstringNoPrimary wallet address when signing with a Hyperliquid API wallet. Must be a valid EVM address (0x + 40 hex chars). When provided, Silhouette verifies the signing address is an authorized API wallet for this primary address and issues a JWT with the primary address as identity.

Example request (direct wallet login):

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-d '{
"operation": "login",
"message": "api.silhouette.exchange wants you to sign in with your Ethereum account:\n0x1234567890123456789012345678901234567890\n\nSign in with Ethereum to the app.\n\nURI: https://api.silhouette.exchange/login\nVersion: 1\nChain ID: 1\nNonce: abcdefghijklmnopqrstuvwxyz123456\nIssued At: 2024-01-15T10:30:00.000Z",
"signature": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890ab"
}'

Example request (API wallet login):

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-d '{
"operation": "login",
"message": "api.silhouette.exchange wants you to sign in with your Ethereum account:\n0xAPI_WALLET_ADDRESS\n\nSign in with Ethereum to the app.\n\nURI: https://api.silhouette.exchange/login\nVersion: 1\nChain ID: 1\nNonce: abcdefghijklmnopqrstuvwxyz123456\nIssued At: 2024-01-15T10:30:00.000Z",
"signature": "0x_SIGNATURE_FROM_API_WALLET",
"primaryAddress": "0xYOUR_MAIN_WALLET_ADDRESS"
}'

Success response:

{
"operation": "login",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHgxMjM0NTY3ODkwMTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwIiwiY2hhaW5JZCI6MSwiaWF0IjoxNzA1MzEzNDAwLCJleHAiOjE3MDUzMTcwMDB9.signature_here",
"responseMetadata": {
"timestamp": 1705313400,
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Error responses:

{
"operation": "login",
"error": "Message and signature are required",
"code": "INVALID_INPUT",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "login",
"error": "Invalid signature",
"code": "INVALID_SIGNATURE",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "login",
"error": "Invalid statement",
"code": "INVALID_STATEMENT",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • The SIWE message must include the exact statement "Sign in with Ethereum to the app." (case-sensitive)
  • The signature must be generated by signing the SIWE message with the private key corresponding to the address in the message
  • The returned JWT token expires after 24 hours
  • Store the token securely - you'll need to include it in the Authorization header for all subsequent API requests
  • If your token expires, simply call this operation again to obtain a new token
  • You can use the login assistant for a simplified authentication flow
  • API wallet login: If you provide a primaryAddress, the SIWE message must be signed by an API wallet authorized for that primary address. The returned JWT will contain the primaryAddress, so all downstream operations work the same as a direct login. See Authentication for details.

Related operations: This operation is prerequisite for private user-scoped operations such as getBalances, createOrder, and withdrawals.

getTokens

Retrieve metadata for all tokens currently supported by the API. This is a public discovery operation; use it instead of hardcoding token metadata in your integration.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Not required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getTokens"

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-d '{
"operation": "getTokens"
}'

Success response:

{
"operation": "getTokens",
"tokens": [
{
"name": "USDC",
"fullName": null,
"index": 0,
"tokenId": "0x6d1e7cde53ba9467b783cb7c530ce054",
"szDecimals": 8,
"weiDecimals": 8,
"isCanonical": true,
"evmContract": {
"address": "0x6b9e773128f453f5c2c60935ee2de2cbc5390a24",
"evm_extra_wei_decimals": -2
}
},
{
"name": "HYPE",
"fullName": "Hyperliquid",
"index": 150,
"tokenId": "0x0d01dc56dcaaca66ad901c959b4011ec",
"szDecimals": 2,
"weiDecimals": 8,
"isCanonical": false,
"evmContract": null
}
],
"responseMetadata": {
"timestamp": 1704067200000,
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Response fields:

FieldTypeDescription
tokensarraySupported token metadata records
tokens[].namestringToken symbol used in API requests, balances, orders, and withdrawals
tokens[].fullNamestring | nullFull token name, when available
tokens[].indexnumberHyperliquid spot token index
tokens[].tokenIdstringHyperliquid token ID as a hex string
tokens[].szDecimalsnumberDecimal precision for order sizes
tokens[].weiDecimalsnumberDecimal precision for the token's smallest unit
tokens[].isCanonicalbooleanWhether the token is canonical on Hyperliquid
tokens[].evmContractobject | nullEVM contract metadata, when available
tokens[].evmContract.addressstringEVM contract address
tokens[].evmContract.evm_extra_wei_decimalsnumberAdditional EVM decimal adjustment for the contract

Error responses:

{
"operation": "getTokens",
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"responseMetadata": {
"timestamp": 1704067200000
}
}

Notes:

  • This operation is public; do not include an Authorization header unless your client adds one globally
  • The supported token set can vary by environment and may change over time
  • Use name as the token symbol for baseToken, quoteToken, and tokenSymbol fields
  • Use getMarkets to discover which token pairs are currently enabled for trading

Related operations: Use getMarkets to discover supported trading pairs, getBalances to view your balances, and createOrder to trade supported tokens.

getMarkets

Retrieve metadata for all trading pairs currently supported by the API. This is a public discovery operation; use it to validate baseToken and quoteToken values before creating orders.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Not required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getMarkets"

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-d '{
"operation": "getMarkets"
}'

Success response:

{
"operation": "getMarkets",
"markets": [
{
"name": "HYPE/USDC",
"baseToken": "HYPE",
"quoteToken": "USDC",
"baseTokenIndex": 150,
"quoteTokenIndex": 0
},
{
"name": "HYPE/USDH",
"baseToken": "HYPE",
"quoteToken": "USDH",
"baseTokenIndex": 150,
"quoteTokenIndex": 360
}
],
"responseMetadata": {
"timestamp": 1704067200000,
"requestId": "650e8400-e29b-41d4-a716-446655440001"
}
}

Response fields:

FieldTypeDescription
marketsarraySupported trading-pair metadata records
markets[].namestringMarket pair name in BASE/QUOTE format
markets[].baseTokenstringBase token symbol for the pair
markets[].quoteTokenstringQuote token symbol for the pair
markets[].baseTokenIndexnumberHyperliquid spot token index for the base token
markets[].quoteTokenIndexnumberHyperliquid spot token index for the quote token

Error responses:

{
"operation": "getMarkets",
"error": "Internal server error",
"code": "INTERNAL_ERROR",
"responseMetadata": {
"timestamp": 1704067200000
}
}

Notes:

  • This operation is public; do not include an Authorization header unless your client adds one globally
  • The supported market set can vary by environment and may change over time
  • The name field is informational; pass baseToken and quoteToken separately when calling createOrder
  • Markets with unavailable token metadata are excluded from the response

Related operations: Use getTokens for token-level metadata and createOrder to place an order on a supported market.

Authenticated Operations

Authenticated operations require a bearer token in the Authorization header and return or modify state scoped to the authenticated user.

getBalances

Retrieve your account balance information for all tokens. This shows your available balance (funds you can trade or withdraw), locked balance (funds tied up in open orders), and total balance.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getBalances"

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "getBalances"
}'

Success response:

{
"operation": "getBalances",
"balances": [
{
"token": "USDC",
"available": "1000000000",
"availableFloat": "1000.0",
"locked": "250000000",
"lockedFloat": "250.0",
"total": "1250000000",
"totalFloat": "1250.0"
}
],
"responseMetadata": {
"timestamp": 1705313400,
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Response fields:

FieldTypeDescription
tokenstringThe token symbol (e.g., "USDC")
availablestringAvailable balance in the token's smallest unit (can be used for trading or withdrawal)
availableFloatstringAvailable balance as a human-readable decimal number
lockedstringBalance locked in open orders, in the token's smallest unit
lockedFloatstringLocked balance as a human-readable decimal number
totalstringTotal balance (available + locked), in the token's smallest unit
totalFloatstringTotal balance as a human-readable decimal number

Error responses:

{
"operation": "getBalances",
"error": "User 0x1234567890123456789012345678901234567890 not found",
"code": "USER_NOT_FOUND",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "getBalances",
"error": "Failed to retrieve balances",
"code": "INTERNAL_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • Balance values are represented in two formats: raw strings in the token's smallest unit (e.g., micro-USDC for USDC) and human-readable float strings
  • For USDC, the smallest unit is micro-USDC, so "1000000000" represents 1,000 USDC
  • The locked field shows funds currently reserved in open orders and unavailable for new trades or withdrawals
  • The available field shows funds you can immediately use for trading or withdrawal
  • If you have no balance for a token, it won't appear in the response array
  • This operation requires authentication - include your bearer token in the Authorization header

Related operations: Use createOrder to trade with your available balance, or initiateWithdrawal to withdraw available funds.

getFees

Retrieve the spot maker and taker fee rates for the authenticated user.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getFees"

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "getFees"
}'

Success response:

{
"operation": "getFees",
"fees": {
"spot": {
"takerRate": "0.000700",
"makerRate": "0.000200",
"takerRatePpm": "700",
"makerRatePpm": "200"
}
},
"responseMetadata": {
"timestamp": 1704067200000,
"requestId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Response fields:

FieldTypeDescription
fees.spot.takerRatestringSpot taker fee as a decimal fraction. For example, "0.000700" is 0.07%.
fees.spot.makerRatestringSpot maker fee as a decimal fraction. For example, "0.000200" is 0.02%.
fees.spot.takerRatePpmstringSpot taker fee in parts per million
fees.spot.makerRatePpmstringSpot maker fee in parts per million

Error responses:

{
"operation": "getFees",
"error": "Unauthorized",
"code": "UNAUTHORIZED",
"responseMetadata": {
"timestamp": 1704067200000
}
}

Notes:

  • Fee rates are scoped to the authenticated user
  • Decimal rate fields are strings for exact transport and display
  • PPM fields are integer strings; for example, "700" means 700 parts per million, or 0.07%

Related operations: Use createOrder to place orders that use these fee rates.

createOrder

Create a new spot order to buy or sell tokens. All orders require an explicit price and are submitted to Hyperliquid as IOC (Immediate or Cancel) orders.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "createOrder"
sidestringYesOrder side: "buy" or "sell"
orderTypestringYesOrder type: "limit" or "market"
baseTokenstringYesThe base token for the trading pair. The live supported set varies by environment; use getMarkets for discovery.
quoteTokenstringYesThe quote token for the trading pair. The live supported set varies by environment; use getMarkets for discovery.
amountstringYesOrder amount as a human-readable decimal string (e.g., "100" or "100.5")
pricestringYesOrder price as a human-readable decimal string.

Example request (limit order):

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "createOrder",
"side": "buy",
"orderType": "limit",
"baseToken": "HYPE",
"quoteToken": "USDC",
"amount": "100.0",
"price": "1.25"
}'

Example request (market order):

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "createOrder",
"side": "sell",
"orderType": "market",
"baseToken": "HYPE",
"quoteToken": "USDC",
"amount": "50.0",
"price": "1.18"
}'

Success response:

{
"operation": "createOrder",
"message": "Order created successfully.",
"orderId": "550e8400-e29b-41d4-a716-446655440000",
"responseMetadata": {
"timestamp": 1705313400,
"requestId": "650e8400-e29b-41d4-a716-446655440001"
}
}

Error responses:

{
"operation": "createOrder",
"error": "Missing required fields: side, orderType, baseToken, quoteToken, and amount are required.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "createOrder",
"error": "Invalid orderType. Must be 'limit' or 'market'.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "createOrder",
"error": "Failed to create order.",
"code": "ORDER_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • Order types:

    • "limit": Order executes at the specified price or better. Requires the price parameter.
    • "market": Order executes immediately at the best available price. The price parameter is ignored.
  • Side:

    • "buy": Purchase the base token using the quote token
    • "sell": Sell the base token for the quote token
  • Tokens and markets: Use getTokens and getMarkets to discover the currently enabled assets and pairs.

  • Amount format: Must be a human-readable decimal string (e.g., "100" or "100.5"). Values are automatically scaled to the token's smallest unit. Do not send pre-scaled values.

  • Price format: Must be a human-readable decimal string (e.g., "1.25"). Values are automatically scaled.

  • Insufficient balance: The order will fail if you don't have sufficient available balance of the required token

  • Save the returned orderId to track the order or correlate it with delegated-order records later.

Related operations: Use listDelegatedOrders to view your orders, and getBalances to check available funds.

cancelOrder

Cancel an open order for the authenticated user. Currently only GTC limit orders support cancellation.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "cancelOrder"
orderIdstringYesThe orderId returned by createOrder for the cancellable limit order. Must be a 0x-prefixed 32-character hex string.

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "cancelOrder",
"orderId": "0x1234567890abcdef1234567890abcdef"
}'

Success response:

{
"operation": "cancelOrder",
"message": "Order canceled successfully.",
"orderId": "0x1234567890abcdef1234567890abcdef",
"responseMetadata": {
"timestamp": 1704067200000,
"requestId": "650e8400-e29b-41d4-a716-446655440001"
}
}

Response fields:

FieldTypeDescription
messagestringCancellation result message
orderIdstringCancelled order ID

Error responses:

{
"operation": "cancelOrder",
"error": "Missing required field: orderId.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1704067200000
}
}
{
"operation": "cancelOrder",
"error": "Invalid orderId format. Expected a 0x-prefixed 32-character hex string.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1704067200000
}
}
{
"operation": "cancelOrder",
"error": "Failed to cancel order.",
"code": "ORDER_ERROR",
"responseMetadata": {
"timestamp": 1704067200000
}
}

Notes:

  • cancelOrder is for cancellable GTC limit orders
  • Use the orderId returned by createOrder. Do not pass a delegated-order ID such as dord_...
  • IOC orders normally fill or cancel immediately and are not cancellable through this operation

Related operations: Use createOrder to place orders and delegated-order operations to inspect delegated-order records.

listDelegatedOrders

Retrieve a paginated list of delegated orders for the authenticated user, optionally filtered by status, order type, or creation time. This is the primary way to enumerate orders placed on your behalf via createOrder.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "listDelegatedOrders"
statusstringNoFilter orders by status: "pending", "open", "filled", "partially_filled", "cancelled", "expired", or "failed"
orderTypestringNoFilter orders by order type: "limit" or "market"
createdAfternumberNoUnix timestamp in milliseconds. Only return orders created after this time.
createdBeforenumberNoUnix timestamp in milliseconds. Only return orders created before this time.
limitnumberNoMaximum orders to return, from 1 to 100
cursorstringNoPagination cursor returned by a previous response

Example request (all orders):

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "listDelegatedOrders"
}'

Example request (filtered and paginated):

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "listDelegatedOrders",
"status": "open",
"orderType": "limit",
"limit": 50
}'

Success response:

{
"operation": "listDelegatedOrders",
"orders": [
{
"orderId": "dord_1234567890abcdef",
"clientOrderId": "client_abc123",
"side": "buy",
"orderType": "limit",
"baseToken": "HYPE",
"status": "open",
"createdAt": 1704067200000
}
],
"pagination": {
"nextCursor": "eyJpZCI6ImRvcmRfMTIzNDU2Nzg5MGFiY2RlZiJ9"
},
"responseMetadata": {
"timestamp": 1704067200000
}
}

Response fields:

FieldTypeDescription
ordersarrayDelegated-order summaries for the current page
orders[].orderIdstringUnique delegated-order identifier, prefixed with dord_
orders[].clientOrderIdstringClient-provided order identifier, when supplied
orders[].sidestringOrder side: "buy" or "sell"
orders[].orderTypestringOrder type: "limit" or "market"
orders[].baseTokenstringBase token symbol
orders[].statusstringCurrent order status
orders[].createdAtnumberUnix timestamp (milliseconds) when the order was created
pagination.nextCursorstringCursor to pass as cursor on the next request to fetch the following page. Absent on the final page.

Notes:

  • Results are returned in reverse chronological order (newest first)
  • To retrieve full order detail, call getDelegatedOrder with a single orderId or batchGetDelegatedOrders with multiple IDs
  • Only orders belonging to the authenticated user are returned

Related operations: Use getDelegatedOrder or batchGetDelegatedOrders to fetch full detail, and createOrder to place new orders.

getDelegatedOrder

Retrieve full details for a single delegated order by its order ID.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getDelegatedOrder"
orderIdstringYesUnique identifier of the delegated order, prefixed with dord_

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "getDelegatedOrder",
"orderId": "dord_1234567890abcdef"
}'

Success response:

{
"operation": "getDelegatedOrder",
"order": {
"orderId": "dord_1234567890abcdef",
"side": "buy",
"orderType": "limit",
"baseToken": "HYPE",
"quoteToken": "USDC",
"amount": "100000000",
"amountFloat": "1",
"price": "4000000000",
"priceFloat": "40",
"status": "filled",
"expiry": 1704153600,
"createdAt": 1704067200000,
"updatedAt": 1704070800000,
"filledAmount": "100000000",
"remainingAmount": "0",
"averageFillPrice": "4000000000",
"clearingVenue": "hyperliquid"
},
"responseMetadata": {
"timestamp": 1704070800000
}
}

Response fields:

FieldTypeDescription
order.orderIdstringUnique delegated-order identifier
order.sidestringOrder side: "buy" or "sell"
order.orderTypestringOrder type: "limit" or "market"
order.baseTokenstringBase token symbol
order.quoteTokenstringQuote token symbol
order.amountstringBase-token order amount as an exact integer string, scaled by 10^baseToken.weiDecimals
order.amountFloatstringHuman-readable base-token order amount convenience string
order.pricestringLimit price as an exact integer string, scaled by 10^8
order.priceFloatstringHuman-readable limit price convenience string
order.statusstringCurrent order status
order.expirynumberOrder expiry as a Unix timestamp (seconds)
order.createdAtnumberUnix timestamp (milliseconds) when the order was created
order.updatedAtnumberUnix timestamp (milliseconds) when the order was last updated
order.filledAmountstringFilled base-token amount as an exact integer string, scaled by 10^baseToken.weiDecimals
order.remainingAmountstringRemaining unfilled base-token amount as an exact integer string, scaled by 10^baseToken.weiDecimals
order.averageFillPricestringAverage execution price as an exact integer string, scaled by 10^8. Present for filled or partially_filled orders.
order.filledPricestringDeprecated legacy execution-price field. Use averageFillPrice instead.
order.clearingVenuestringVenue where the order is executed (currently always "hyperliquid")

Error responses:

{
"operation": "getDelegatedOrder",
"error": "Delegated order with ID 'dord_1234567890abcdef' not found for user",
"code": "NOT_FOUND",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • You can only retrieve delegated orders that belong to the authenticated user. Looking up another user's order returns NOT_FOUND
  • To retrieve several orders in a single request, use batchGetDelegatedOrders
  • Delegated-order amounts and prices are returned as exact integer strings to preserve precision. For accounting-sensitive logic, parse these fields as arbitrary-precision integers, such as JavaScript BigInt, and apply the documented scale when formatting values for display.
  • amount, filledAmount, and remainingAmount are base-token amounts scaled by 10^baseToken.weiDecimals. Get weiDecimals from the public unauthenticated getTokens operation.
  • price and averageFillPrice are price fields scaled by 10^8. To convert to a decimal price, divide by 100,000,000.
  • amountFloat and priceFloat are convenience strings for display. Use the exact integer string fields for accounting-sensitive logic.
  • Example: If baseToken = HYPE and HYPE.weiDecimals = 8, then filledAmount = "100000000" means 1.0 HYPE, remainingAmount = "50000000" means 0.5 HYPE, and averageFillPrice = "4000000000" means 40.0 quote tokens per 1 base token.
  • filledPrice is deprecated in delegated-order detail responses. Use averageFillPrice instead.

Related operations: Use listDelegatedOrders to enumerate orders, and batchGetDelegatedOrders to fetch multiple orders in one call.

batchGetDelegatedOrders

Retrieve full details for up to 100 delegated orders in a single request.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "batchGetDelegatedOrders"
orderIdsarray of stringsYesDelegated-order IDs to retrieve. Between 1 and 100 entries.

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "batchGetDelegatedOrders",
"orderIds": [
"dord_1234567890abcdef",
"dord_fedcba0987654321"
]
}'

Success response:

{
"operation": "batchGetDelegatedOrders",
"orders": [
{
"orderId": "dord_1234567890abcdef",
"side": "buy",
"orderType": "limit",
"baseToken": "HYPE",
"quoteToken": "USDC",
"amount": "100000000",
"amountFloat": "1",
"price": "4000000000",
"priceFloat": "40",
"status": "partially_filled",
"expiry": 1704153600,
"createdAt": 1704067200000,
"updatedAt": 1704067200000,
"filledAmount": "50000000",
"remainingAmount": "50000000",
"averageFillPrice": "4000000000",
"clearingVenue": "hyperliquid"
}
],
"notFound": [
"dord_fedcba0987654321"
],
"responseMetadata": {
"timestamp": 1704067200000
}
}

Response fields:

FieldTypeDescription
ordersarrayFull order detail for each ID that matched an order you own. Entries use the same shape as getDelegatedOrder.
notFoundarray of stringsOrder IDs from the request that could not be resolved, either because they do not exist or do not belong to you

Notes:

  • Request up to 100 orderIds per call
  • Missing or foreign orders are reported through notFound rather than an error, so partial results are always returned when at least one ID resolves
  • Delegated-order amount and price fields in orders use the same exact integer string contract as getDelegatedOrder
  • amountFloat and priceFloat are convenience strings for display. Use the exact integer string fields for accounting-sensitive logic.
  • filledPrice is deprecated in delegated-order detail responses. Use averageFillPrice instead.

Related operations: Use listDelegatedOrders to discover order IDs, and getDelegatedOrder to fetch a single order.

getUserOrders

Decommissioned

getUserOrders has been fully decommissioned. Use the delegated-order operations instead: listDelegatedOrders to enumerate and paginate orders, getDelegatedOrder for a single order, or batchGetDelegatedOrders to fetch multiple orders in one call.

initiateWithdrawal

Request a withdrawal of funds from your Silhouette account back to your HyperCore address. Withdrawals are processed asynchronously, and you'll receive a withdrawal ID to track the status.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "initiateWithdrawal"
tokenSymbolstringYesThe token to withdraw: "USDC" or "HYPE"
amountstringYesWithdrawal amount as a human-readable decimal string (e.g., "100" or "100.5")

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "initiateWithdrawal",
"tokenSymbol": "USDC",
"amount": "500.0"
}'

Success response:

{
"operation": "initiateWithdrawal",
"message": "Withdrawal request accepted and queued for processing.",
"withdrawalId": "550e8400-e29b-41d4-a716-446655440000",
"responseMetadata": {
"timestamp": 1705313400,
"requestId": "650e8400-e29b-41d4-a716-446655440001"
}
}

Error responses:

{
"operation": "initiateWithdrawal",
"error": "Missing required fields: tokenSymbol and amount are required.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "initiateWithdrawal",
"error": "Invalid tokenSymbol. Must be 'USDC' or 'HYPE'.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "initiateWithdrawal",
"error": "A withdrawal request is already in progress for this user.",
"code": "CONFLICT",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "initiateWithdrawal",
"error": "The withdrawal service is temporarily unavailable. Please try again later.",
"code": "SERVICE_UNAVAILABLE",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • Withdrawals are processed asynchronously. The API returns a withdrawalId immediately, but the actual withdrawal takes time to process
  • You can only have one pending withdrawal at a time. Wait for your current withdrawal to complete before initiating another
  • The amount must not exceed your available balance (not including locked funds in open orders)
  • Amount format: Must be a human-readable decimal string (e.g., "100" or "100.5"). Values are automatically scaled to the token's smallest unit. Do not send pre-scaled values
  • Use getWithdrawalStatus with the returned withdrawalId to track the withdrawal progress
  • Tokens: Currently supports "USDC" and "HYPE" only
  • Funds will be sent to your HyperCore address (the address associated with your authenticated wallet)

Related operations: Use getWithdrawalStatus to check withdrawal progress, getUserWithdrawals to view all your withdrawals, and getBalances to verify available funds.

getWithdrawalStatus

Check the status of a specific withdrawal using its withdrawal ID. This shows whether the withdrawal is still pending, has completed successfully, or has failed.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getWithdrawalStatus"
withdrawalIdstringYesThe unique identifier of the withdrawal to check

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "getWithdrawalStatus",
"withdrawalId": "550e8400-e29b-41d4-a716-446655440000"
}'

Success response (pending):

{
"operation": "getWithdrawalStatus",
"withdrawal": {
"withdrawalId": "550e8400-e29b-41d4-a716-446655440000",
"token": "USDC",
"amount": "500000000",
"state": "pending",
"txHash": null,
"errorMessage": null,
"created_at": 1705313400000,
"updated_at": 1705313400000
},
"responseMetadata": {
"timestamp": 1705313450,
"requestId": "650e8400-e29b-41d4-a716-446655440001"
}
}

Success response (completed):

{
"operation": "getWithdrawalStatus",
"withdrawal": {
"withdrawalId": "550e8400-e29b-41d4-a716-446655440000",
"token": "USDC",
"amount": "500000000",
"state": "completed",
"txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"errorMessage": null,
"created_at": 1705313400000,
"updated_at": 1705313500000
},
"responseMetadata": {
"timestamp": 1705313550,
"requestId": "750e8400-e29b-41d4-a716-446655440002"
}
}

Success response (failed):

{
"operation": "getWithdrawalStatus",
"withdrawal": {
"withdrawalId": "550e8400-e29b-41d4-a716-446655440000",
"token": "USDC",
"amount": "500000000",
"state": "failed",
"txHash": null,
"errorMessage": "Insufficient balance on enclave wallet",
"created_at": 1705313400000,
"updated_at": 1705313450000
},
"responseMetadata": {
"timestamp": 1705313500,
"requestId": "850e8400-e29b-41d4-a716-446655440003"
}
}

Response fields:

FieldTypeDescription
withdrawalIdstringUnique identifier for the withdrawal
tokenstringThe token symbol being withdrawn
amountstringWithdrawal amount in the token's smallest unit
statestringWithdrawal status: "pending", "completed", or "failed"
txHashstring | nullTransaction hash on Hyperliquid (only set when state is "completed")
errorMessagestring | nullError description (only set when state is "failed")
created_atnumberUnix timestamp (milliseconds) when the withdrawal was created
updated_atnumberUnix timestamp (milliseconds) when the withdrawal was last updated

Withdrawal states:

  • "pending": Withdrawal is queued and being processed
  • "completed": Withdrawal was successful. Check txHash for the transaction details
  • "failed": Withdrawal failed. Check errorMessage for the reason

Error responses:

{
"operation": "getWithdrawalStatus",
"error": "Missing or invalid withdrawalId.",
"code": "VALIDATION_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}
{
"operation": "getWithdrawalStatus",
"error": "Withdrawal not found.",
"code": "NOT_FOUND",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • You can only query your own withdrawals. Attempting to check another user's withdrawal returns NOT_FOUND
  • Poll this endpoint periodically to track withdrawal progress
  • When state is "completed", use the txHash to verify the transaction on the Hyperliquid blockchain
  • When state is "failed", check the errorMessage to understand why the withdrawal failed
  • The withdrawalId is returned when you call initiateWithdrawal

Related operations: Use initiateWithdrawal to request a withdrawal, and getUserWithdrawals to view all your withdrawals.

getUserWithdrawals

Retrieve a list of all your withdrawal requests, including their current status. This provides a complete history of your withdrawals.

Endpoint: POST https://api.silhouette.exchange/v0

Authentication: Required

Request parameters:

ParameterTypeRequiredDescription
operationstringYesMust be "getUserWithdrawals"

Example request:

curl https://api.silhouette.exchange/v0 \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_TOKEN_HERE" \
-d '{
"operation": "getUserWithdrawals"
}'

Success response:

{
"operation": "getUserWithdrawals",
"withdrawals": [
{
"withdrawalId": "650e8400-e29b-41d4-a716-446655440001",
"token": "USDC",
"amount": "500000000",
"state": "completed",
"txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"errorMessage": null,
"created_at": 1705313400000,
"updated_at": 1705313500000
},
{
"withdrawalId": "550e8400-e29b-41d4-a716-446655440000",
"token": "HYPE",
"amount": "100000000",
"state": "pending",
"txHash": null,
"errorMessage": null,
"created_at": 1705313200000,
"updated_at": 1705313200000
},
{
"withdrawalId": "450e8400-e29b-41d4-a716-446655440002",
"token": "USDC",
"amount": "250000000",
"state": "failed",
"txHash": null,
"errorMessage": "Insufficient balance on enclave wallet",
"created_at": 1705313000000,
"updated_at": 1705313050000
}
],
"responseMetadata": {
"timestamp": 1705313600,
"requestId": "750e8400-e29b-41d4-a716-446655440003"
}
}

Response fields:

Each withdrawal in the array has the following fields:

FieldTypeDescription
withdrawalIdstringUnique identifier for the withdrawal
tokenstringThe token symbol being withdrawn
amountstringWithdrawal amount in the token's smallest unit
statestringWithdrawal status: "pending", "completed", or "failed"
txHashstring | nullTransaction hash on Hyperliquid (only set when state is "completed")
errorMessagestring | nullError description (only set when state is "failed")
created_atnumberUnix timestamp (milliseconds) when the withdrawal was created
updated_atnumberUnix timestamp (milliseconds) when the withdrawal was last updated

Error responses:

{
"operation": "getUserWithdrawals",
"error": "An internal error occurred while fetching withdrawals.",
"code": "INTERNAL_ERROR",
"responseMetadata": {
"timestamp": 1705313400
}
}

Notes:

  • Withdrawals are returned in reverse chronological order (newest first)
  • If you have no withdrawals, the withdrawals array will be empty
  • Use this to get an overview of all your withdrawal activity
  • Each withdrawal includes the same fields as getWithdrawalStatus
  • Amount values are in the token's smallest unit (for USDC, micro-USDC)

Related operations: Use initiateWithdrawal to create a new withdrawal, and getWithdrawalStatus to check the status of a specific withdrawal.