> For the complete documentation index, see [llms.txt](https://docs.lighter.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lighter.xyz/api/referral/userreferrals.md).

# userReferrals

Get user referrals

```json
{"openapi":"3.0.0","info":{"title":"Lighter API","version":"1.0.0"},"tags":[{"name":"referral"}],"servers":[{"url":"https://mainnet.zklighter.elliot.ai","description":"Lighter mainnet"},{"url":"https://api.testnet.lighter.xyz","description":"Lighter testnet"},{"url":"https://api.rh.lighter.xyz","description":"Lighter on Robinhood Chain mainnet"},{"url":"https://api.rh-testnet.lighter.xyz","description":"Lighter on Robinhood Chain testnet"}],"paths":{"/api/v1/referral/userReferrals":{"get":{"summary":"userReferrals","operationId":"referral_userReferrals","tags":["referral"],"description":"Get user referrals","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string"},"description":"Auth token in the Authorization header."},{"name":"l1_address","in":"query","required":true,"schema":{"type":"string"},"description":"Ethereum L1 wallet address."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"},"description":"Opaque pagination cursor returned by the previous response; pass it unchanged."},{"name":"stats_start_timestamp","in":"query","required":false,"schema":{"type":"integer","format":"int64"},"description":"Inclusive start of referral statistics, as a Unix timestamp in milliseconds."},{"name":"stats_end_timestamp","in":"query","required":false,"schema":{"type":"integer","format":"int64"},"description":"End of referral statistics, as a Unix timestamp in milliseconds."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","format":"int64","minimum":1,"maximum":300},"description":"Maximum number of records to return."},{"name":"is_eligible","in":"query","required":false,"schema":{"type":"boolean","default":false},"description":"Restrict statistics to users eligible for the referral program when true."}],"responses":{"200":{"description":"A successful response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserReferrals"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultCode"}}}}}}}},"components":{"schemas":{"UserReferrals":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"cursor":{"type":"string"},"referrals":{"type":"array","items":{"$ref":"#/components/schemas/Referral"}},"used_code":{"type":"string"},"totals":{"$ref":"#/components/schemas/ReferralTotals"},"used_code_eligible":{"type":"boolean"},"l1_eligible":{"type":"boolean","description":"Whether the caller's L1 address is not excluded from the referee rebate, whether or not a referral code is bound yet. It does not check whether a code binding would be accepted."}},"required":["code","cursor","used_code","totals","referrals","used_code_eligible","l1_eligible"],"title":"UserReferrals"},"Referral":{"type":"object","properties":{"l1_address":{"type":"string"},"referral_code":{"type":"string"},"used_at":{"type":"integer","format":"int64"},"trade_stats":{"$ref":"#/components/schemas/TradeStats"},"tier":{"type":"string"},"source":{"type":"string"},"live_points":{"type":"number","format":"double"},"weekly_points":{"type":"number","format":"double"}},"required":["l1_address","referral_code","used_at","tier","source","trade_stats"],"title":"Referral","description":"Fields with zero or empty values may be omitted; handle optional properties when decoding responses."},"TradeStats":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"web_count":{"type":"integer","format":"int64"},"web_volume":{"type":"string"},"mobile_app_count":{"type":"integer","format":"int64"},"mobile_app_volume":{"type":"string"},"mobile_browser_count":{"type":"integer","format":"int64"},"mobile_browser_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"non_free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"taker_fees_paid":{"type":"string"},"free_maker_volume":{"type":"string"}},"title":"TradeStats","required":["count","volume","web_count","web_volume","mobile_app_count","mobile_app_volume","mobile_browser_count","mobile_browser_volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid"]},"ReferralTotals":{"type":"object","properties":{"count":{"type":"integer","format":"int64"},"volume":{"type":"string"},"free_maker_volume":{"type":"string"},"free_taker_volume":{"type":"string"},"non_free_maker_volume":{"type":"string"},"non_free_taker_volume":{"type":"string"},"maker_fees_paid":{"type":"string"},"taker_fees_paid":{"type":"string"},"total_referrals":{"type":"integer","format":"int64"},"total_premium_referrals":{"type":"integer","format":"int64"},"live_points":{"type":"number","format":"double"},"weekly_points":{"type":"number","format":"double"}},"title":"ReferralTotals","required":["count","volume","free_maker_volume","free_taker_volume","non_free_maker_volume","non_free_taker_volume","maker_fees_paid","taker_fees_paid","total_referrals","total_premium_referrals"],"description":"Fields with zero or empty values may be omitted; handle optional properties when decoding responses."},"ResultCode":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}},"title":"ResultCode","required":["code"]}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lighter.xyz/api/referral/userreferrals.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
