users

Get a user's open position for a symbol

Changed on
get/v1/users/{userId}/position

Request

  • Base URL
    https://app.legend.trade/api/rest
  • URL
    https://app.legend.trade/api/rest/v1/users/{userId}/position
  • Auth
    HTTP bearer

Path parameters

userIdstring uuid required

Query parameters

symbolstring required

Response

Successful response

idstring required
network'hyperliquid_testnet' | 'hyperliquid_mainnet' | 'hyperliquid_paper' required
user_idstring required
wallet_addressstring required
symbolstring required
side'LONG' | 'SHORT' required
sizenumber required
entry_pricenumber required
max_sizenumber nullable required
leverage_typestring required
leverage_valueinteger required
margin_usednumber nullable required
realized_pnlnumber required
unrealized_pnlnumber required
total_feesnumber nullable required
cum_funding_since_opennumber required
cum_funding_since_changenumber required
opened_atstring required
updated_atstring required
closed_atstring nullable required
closed_pricenumber nullable required
close_notified_atstring nullable required
open_notified_atstring nullable required
position_move_last_notified_pctnumber nullable required
pnl_sparklineunknown required
notional_usdnumber nullable required

Changes

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • breaking

      the response property / became nullable for the status

    • info

      response property anyOf[subschema #1]/close_notified_at list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/closed_at list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/closed_price list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/margin_used list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/max_size list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/notional_usd list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/open_notified_at list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/position_move_last_notified_pct list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      response property anyOf[subschema #1]/total_fees list-of-types was narrowed by removing types null from media type application/json of response 200

    • info

      added to the / response property anyOf list for the response status

    • info

      removed subschema #1 from the / response property anyOf list for the response status