For the complete documentation index, see llms.txt. This page is also available as Markdown.

Public Endpoints

REST API endpoints accessible without authentication

Public endpoints do not require signatures or authentication.

Base URL: https://api.app.hello.trade/api


GET /api/account_summary

Get account balance, positions, and margin summary.

Request

Query parameters:

Parameter
Type
Required
Description

wallet

Address

Yes

Wallet address

Example:

GET /api/account_summary?wallet=0x742d35Cc6634C0532925a3b844Bc9e7595f12345

Response

{
  "assetPositions": [
    {
      "instrument": "NVDA",
      "marginMode": "Cross",
      "entryPx": "500.00",
      "leverage": 10,
      "liquidationPx": "450.00",
      "marginUsed": "100.00",
      "maxLeverage": 20,
      "positionValue": "1000.00",
      "returnOnEquity": "0.05",
      "szi": "2",
      "unrealizedPnl": "50.00"
    },
    {
      "instrument": "BTC",
      "marginMode": "Isolated",
      "entryPx": "65000.00",
      "leverage": 10,
      "liquidationPx": "59240.50",
      "marginUsed": "650.00",
      "maxLeverage": 40,
      "positionValue": "6500.00",
      "returnOnEquity": "0",
      "szi": "0.1",
      "unrealizedPnl": "0",
      "transferable": "0.00"
    }
  ],
  "crossMaintenanceMarginUsed": "25.00",
  "crossMarginSummary": {
    "accountValue": "10000.00",
    "totalMarginUsed": "100.00",
    "totalNtlPos": "1000.00",
    "totalRawUsd": "9950.00"
  },
  "maintenanceMarginUsed": "106.25",
  "marginSummary": {
    "accountValue": "10650.00",
    "totalMarginUsed": "750.00",
    "totalNtlPos": "7500.00",
    "totalRawUsd": "10600.00"
  },
  "time": 1705600000000,
  "withdrawable": "9900.00"
}

Response Fields

Top Level:

Field
Type
Description

assetPositions

Array

Cross and isolated positions

crossMaintenanceMarginUsed

string

Maintenance margin used (cross only)

crossMarginSummary

Object

Margin summary (cross only)

maintenanceMarginUsed

string

Maintenance margin used (cross + isolated)

marginSummary

Object

Combined margin summary (cross + isolated)

time

i64

Response timestamp (milliseconds)

withdrawable

string

Cross collateral available for withdrawal

Asset Position:

Field
Type
Description

instrument

string

Instrument symbol

marginMode

string

Cross or Isolated

entryPx

string

Average entry price

leverage

u32

Position leverage (multiplier, e.g. 10 = 10×)

liquidationPx

string

Estimated liquidation price (omitted if not computable)

marginUsed

string

Margin allocated to the position (for isolated: the position's dedicated margin)

maxLeverage

u32

Maximum allowed leverage (multiplier, e.g. 20 = 20×)

positionValue

string

Notional position value

returnOnEquity

string

ROE percentage

szi

string

Position size (signed, positive = long)

unrealizedPnl

string

Unrealized PnL

transferable

string

Isolated collateral free to transfer to cross (isolated positions only)

Margin Summary:

Field
Type
Description

accountValue

string

Total account value

totalMarginUsed

string

Total margin used

totalNtlPos

string

Total notional position value

totalRawUsd

string

Total collateral balance (excluding unrealized PnL)


GET /api/open_orders

Get the wallet's currently open (resting) orders. Like the other read endpoints, this is public — any wallet address may be queried (no ownership proof required).

Request

Query parameters:

Parameter
Type
Required
Description

wallet

Address

Yes

Wallet address

mode

string

No

Margin scope: combined (default), cross, or isolated

instruments

string

No

Comma-separated symbols narrowing mode=isolated results (only valid with that mode)

Examples:

Response

Response Fields

Top Level:

Field
Type
Description

orders

Array

List of open orders

Order:

Field
Type
Description

orderId

u64

Exchange order ID

marginMode

string

Cross or Isolated

traderOrderId

u64

Client-supplied order ID (omitted for system-generated orders)

instrument

string

Instrument symbol

orderType

string

Limit, StopLimit, StopLoss, TakeProfit; responses may also contain internal execution types (LIT) and retired types (Market, Stop, MIT, MarketToLimit) on historic orders

side

string

Buy or Sell

quantity

string

Order quantity

price

string

Limit price (omitted if not applicable)

stopPrice

string

Stop trigger price (omitted if not applicable)

closePosition

boolean

SL/TP only: true = managed (auto-syncs to position size), false = unmanaged (fixed qty). Omitted for non-SL/TP orders

instructions

string[]

["PostOnly"] for a post-only order (omitted otherwise)

timeInForce

string

GTC, GTD, IOC, FOK, DAY

expiryDate

i64

Expiry timestamp for GTD (milliseconds; omitted otherwise)

status

string

Active, Suspended, Executed, Cancelled, Pending, Ended

filledQuantity

string

Cumulative filled quantity

filledPrice

string

Weighted average filled price

remainingOpenQuantity

string

Quantity still open

orderTimestamp

i64

Order creation timestamp (Unix nanoseconds)

lastEventTimestamp

i64

Timestamp of the last event on this order (Unix nanoseconds)

lastEventId

u64

ID of the last event on this order


GET /api/historic/orders

Query historical orders.

Request

Query parameters:

Parameter
Type
Required
Description

wallet

Address

Yes

Wallet address

dateFrom

DateTime

No

Start date (ISO 8601)

dateTo

DateTime

No

End date (ISO 8601)

instruments

string

No

Comma-separated instruments (e.g., NVDA,AAPL)

traderOrderId

u64

No

Filter by client order ID

orderId

u64

No

Filter by exchange order ID

orderBy

string

No

Sort as <field>:<direction>. Field: createdAt or lastEventTimestamp. Direction: Asc or Desc.

limit

u32

No

Max results (default: 50)

offset

u64

No

Pagination offset

Example:

Example with sorting:

Response

Response Fields

Top Level:

Field
Type
Description

orders

Array

Order records

count

u64

Total matching records (omitted if not computed)

Order:

Field
Type
Description

orderId

u64

Exchange order ID

traderOrderId

u64

Client-supplied order ID (omitted for system-generated orders)

instrumentId

u32

Numeric instrument identifier

instrument

string

Instrument symbol

status

string

Active, Suspended, Executed, Cancelled, Pending, Ended

orderType

string

Limit, StopLimit, StopLoss, TakeProfit; responses may also contain internal (LIT) and retired (Market, Stop, MIT, MarketToLimit) types

side

string

Buy or Sell

price

string | null

Limit price (null if not applicable)

quantity

string

Order quantity

timeInForce

string

GTC, GTD, IOC, FOK, DAY

expiryDate

i64 | null

Expiry timestamp for GTD, in Unix seconds (null otherwise)

createdAt

i64

Order creation timestamp, in Unix seconds

filledPrice

string

Weighted average filled price

filledQuantity

string

Cumulative filled quantity

remainingOpenQuantity

string

Quantity still open

lastEventTimestamp

i64

Timestamp of the last event on this order, in Unix seconds

stopPrice

string

Stop trigger price (omitted if not applicable)

minQuantity

string

Minimum order quantity (omitted if not set)

cancelReason

string

Reason for cancellation (omitted unless cancelled)

instructions

string[]

["PostOnly"] for a post-only order (omitted otherwise)


GET /api/account/trades

Query a wallet's trade history, newest first. Fills come from settlement on chain, with exchange identifiers attached; busted trades are included as CANCELLED rows.

Request

Query parameters:

Parameter
Type
Required
Description

wallet

Address

Yes

Wallet address

instrumentIds

string

No

Comma-separated instrument IDs, e.g. 24,25

kinds

string

No

Comma-separated STANDARD, LIQUIDATION, ADL, MARKET_CLOSURE, CANCELLED

dateFrom

DateTime

No

Start time, inclusive (ISO 8601)

dateTo

DateTime

No

End time, inclusive (ISO 8601)

limit

u32

No

Max results (default: 50, max: 50)

offset

u64

No

Pagination offset (max: 50)

List values have no spaces.

Paging: past the first 100 rows, request the next page with dateTo set to the oldest timestamp received. dateTo is inclusive, so rows from that second repeat; deduplicate by id.

Example:

Response

Response Fields

Field
Type
Description

marketType

string

PERPS

id

string

Unique row ID; deduplicate on this

kind

string

STANDARD, LIQUIDATION, ADL, MARKET_CLOSURE, or CANCELLED (bust)

role

string

MAKER, TAKER, LIQUIDATOR, ADL_CLOSER, LIQUIDATEE (omitted on busts)

instrumentId

u64

Instrument ID

instrument

string

Instrument symbol

side

string

Buy or Sell

price

string

USD per unit

quantity

string

Base units

timestamp

i64

Block time, or bust time for busts, in Unix seconds

marginMode

string

Cross or Isolated (fills only)

notional

string

USD (omitted on busts)

fee

string

USD (fills only)

realizedPnl

string

USD, negative on a loss

counterparty

string

ADL counterparty (ADL only)

orderId

u64

Exchange order ID (omitted on ADL, manual liquidation and unaligned fills)

traderOrderId

u64

Client-supplied order ID (same availability as orderId)

txHash

string

Settlement transaction (omitted on busts)

blockNumber

u64

Settlement block (omitted on busts)

logIndex

u32

Log index in the block (fills only)

tradeId

u64

Exchange trade ID (shared by a bust and the trade it cancelled)

tradeDate

Date

Exchange business day (same availability as tradeId)


GET /api/historic/funding

Query a wallet's historic funding payments. Cross-margin and isolated-margin funding are merged into a single list, sorted newest-first, with each entry tagged by marginMode.

Request

Query parameters:

Parameter
Type
Required
Description

wallet

Address

Yes

Wallet address

market

u64

No

Filter by instrument ID

dateFrom

DateTime

No

Start time, inclusive (ISO 8601)

dateTo

DateTime

No

End time, inclusive (ISO 8601)

limit

u32

No

Max results (default: 50, max: 50)

offset

u64

No

Pagination offset

For large histories, prefer narrowing with dateFrom/dateTo over large offset values.

Example:

Response

Field
Type
Description

funding

Array

Funding transactions

count

u64

Records returned in this page

Funding Transaction:

Field
Type
Description

market

u64

Instrument ID

timestamp

i64

Funding event time (Unix seconds)

delta

string

Funding amount in USD (positive = received, negative = paid)

marginMode

string

Cross or Isolated


GET /api/user/access-status/:walletAddress

Returns whether a wallet has been granted app access. Mirrors the predicate the authentication gate uses, so clients can branch on it before prompting the user to sign anything.

Request

Path parameter:

Parameter
Type
Required
Description

walletAddress

Address

Yes

Wallet to query (case-insensitive; server lowercases)

Example:

Response

Field
Type
Description

hasAppAccess

boolean

true iff the wallet has applied any referral code (affiliate or system) or was granted access by an admin

If false, prompt the user for an invite code and submit it via POST /api/referral/apply (see Authenticated Endpoints).


Common Errors

HTTP Status
Description

400

Bad Request (invalid parameters)

404

Not Found (account not found)

500

Internal Server Error

Error response format:

Last updated