All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| list_user_coupons | GET /coupon/user-coupon-list | Coupon Center list |
| get_user_coupon_detail | GET /coupon/user-coupon-detail | Coupon Center details |
ListUserCouponsResponse list_user_coupons(expired=expired, limit=limit, last_id=last_id, expire_time=expire_time, order_by=order_by, type=type, is_task_coupon=is_task_coupon)
Coupon Center list
Interface description The general list interface of the card and coupon center returns all the cards and coupons of the currently logged in user (supports paging, filtering type, and valid/invalid switching). --- ## Query Parameters | Parameter name | Type | Required | Default value | Constraints | Description | |--------|------|------|--------|------|------| | expired | integer | No | 0 | 0 or 1 | 0 = Query valid cards and coupons; 1 = Check expired/used cards | | limit | integer | No | 10 | 1 ~ 20 | The number of cards returned per page | | last_id | integer | No | 0 | 1 ~ 1000000000 | Cursor paging: the last record of the previous page id, the home page does not transmit | | expire_time | integer | no | 0 | 1 ~ 2147483647 | Cursor pagination: with last_id Union usage expiration time (Unix timestamp) | | order_by | string | no | latest | latest / expired | Sorting method: latest = sort by latest receipt; expired = sort by expiration time in ascending order | | type | string | No | Empty (return all) | See the card type table below | Only return cards of the specified type | | is_task_coupon | integer | No | Do not pass (return all) | 0 or 1 | 0 = Only ordinary cards and coupons are returned; 1 = Only mission cards and coupons are returned; both are returned without passing | ### Supported coupon types (type parameter enumeration value) The main site (gate.io default site) supports the following types, and different sub-sites (Türkiye, United States, Malta, Australia) have their own whitelist restrictions. | type value | Coupon name | Version limit (below this version will not be returned/cannot be transferred) | |-----------|---------|-------------------------------| | position_voucher | Position experience coupon | Unlimited | | tradfi_position_voucher | TradFi position experience coupon | Android < 7320000 / iOS < 202507320000 does not return | | contract_bonus | Contract trial bonus | Unlimited | | contract_bonus_new | Contract experience coupon | Unlimited | | commission_rebate | Fee rebate coupons | Unlimited | | hold_bonus | Financial management trial bonus | Unlimited | | point | Point card | Unlimited (main site/Türkiye site only) | | financial_rate | Interest rate coupons | Unlimited | | robot_bonus | Robot trial bonus | Unlimited | | loss_protection_copier | Worry-free money for copying orders | Unlimited | | vip_card | VIP experience card | Unlimited | | interest_voucher | Leveraged coupons | Unlimited | | p2p | P2P transaction coupons | Unlimited | | cash | Cash Vouchers | Unlimited | | crypto_loan_interest | Mortgage currency interest reduction coupons | Android < 7290000 / iOS < 202507290000 does not return | | copy_trading | Trading experience bonus | Android < 7320000 / iOS < 202507320000 No return | | alpha_voucher | Alpha Cash Voucher | Android < 7320000 / iOS < 202507320000 Do not return | | etf_voucher | ETF trial fund | Android < 7320000 / iOS < 202507320000 No return | --- ##Response ### Outer structure json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": true, \"list\": [ ...array of coupon objects... ] } } | Field | Type | Description | |------|------|------| | code | integer | 0 = success | | message | string | response message | | data.next_page | boolean | Whether there is a next page. true = There is more data, the id of the last item on this page needs to be last_id is passed in for the next request | | data.list | array | Array of coupon objects, see below for details | --- ### Public fields of card and coupon objects (included in all types) | Field name | Type | Description | |--------|------|------| | id | integer | Card and coupon issuance record ID (coupon_send_issuing_log.id), used for paging cursor last_id | | details_id | integer | The primary key ID of the user card details table (independent tables for each type) | | coupon_type | string | Coupon type, see the enumeration table above | | name | string | Card display name (i18n translated) | | amount | string | Coupon denomination (formatted string, including thousandth sign). Different types have different meanings, see explanation below | | currency | string | The denomination unit. Different types have different values, see explanation below | | rule_new | string | Use rule text (this field in the list interface always returns the empty string \"\", and only in the detail interface) | | status | string | Card status, see status enumeration below | | jump_url | object | jump link | | jump_url.web | string | Web jump link | | jump_url.app | string | App jump link | | jump_url.mini_app | string | Mini program jump link (most types are empty strings) | | help_url | object | Help center link | | help_url.web | string | Web help link | | help_url.app | string | App help link | | expire_time | integer | Expiration time (Unix timestamp). Note: Some types will be adjusted to the actual expiration time after they have been activated or used | | expire_time_order_by | integer | Expiration time for sorting (taken from the original expiration time of the issuance record, not affected by activation) | | expire_second | integer | The number of seconds remaining before expiration (expired or point card type returns 0) | | has_usage_history | boolean | Whether there is a usage record (the point card type is fixed to true, and the rest are judged based on the type) | | has_progress | boolean | Whether to display the progress bar (only commission_rebate, interest_voucher and task coupons that meet the conditions are true) | | progress_config | object | Progress bar configuration, when has_progress is false, each field is an empty string | | progress_config.total_balance | string | The total amount to be completed | | progress_config.current_used | string | Amount used | | progress_config.current_achived | string | Amount achieved | | progress_config.currency | string | Progress unit | | activation_info | object | Activation information exclusive to each type, see each type description below (types without exclusive information return empty objects {}) | | is_task_coupon | integer | 0 = ordinary coupon; 1 = task coupon | | upgrade_toast | boolean | Whether the user needs to be prompted to upgrade the App (true when the version is too old and cannot support the coupon) | | task_title | string | Task title (only task coupons have value, ordinary coupons are \"\") | | task_desc | string | Task description (only task coupons have value, ordinary coupons are \"\") | | task_start_at | integer | Task start timestamp (only TASK_EXPIRED status task coupons have value, the rest are 0) | | task_expire_at | integer | Task expiration timestamp (currently fixed to 0, reserved field) | | task_completed_at | integer | Task completion timestamp (currently fixed at 0, reserved field) | | extra | array | Extended field, fixed return empty array [] | --- ### status status enumeration | Value | Applicable objects | Description | |----|---------|------| | NOT_ACTIVE | Ordinary coupons | Pending activation (not yet activated) | | ACTIVATED | Ordinary coupons | Activated (activating or after activation) | | TO_BE_USED | Ordinary coupons | To be used (valid and not used) | | EXPIRED | Ordinary coupons | Expired (expired without being used) | | RECYCLED | Ordinary cards and coupons | Recycled (such as contract recharge experience coupons are recycled) | | INVALID | Ordinary coupons | Expired | | USED | Ordinary coupons | Used/consumed | | UNKNOWN | Ordinary coupons | Unknown status | | LOCKED | Ordinary cards and coupons (p2p) | Locked (P2P transaction in progress, waiting for write-off) | | TASK_START | Task coupons | The task has not started (the coupon has been issued and the task is to be started) | | TASK_WAIT | Task coupons | Task in progress (to be completed) | | TASK_DONE | Task coupons | The task has been completed (receiving is being processed) | | TASK_EXPIRED | Task coupon | The task is not completed and has expired | | TASK_NOT_STARTED_EXPIRED | Task coupon | The task has expired before it started | | TASK_RECEIVE_SUCCESS | Task coupons | Task rewards received successfully | | TASK_RECEIVE_FAIL | Task coupons | Failed to receive task rewards | --- ### amount / currency Description of each type | coupon_type | amount description | currency value | |---------------|--------------|---------------| | point | Point card balance (including thousandths) | \"POINT\" | | position_voucher | Coupon face amount × leverage multiple (including thousandths) | Such as \"USDT\" | | tradfi_position_voucher | Coupon face amount × leverage multiple (including thousandths) | \"USDx\" | | financial_rate | Interest rate increase value + %, such as \"5%\" | \"APR\" | | vip_card | VIP level number, such as \"4\" | \"VIP\" | | interest_voucher | Interest rate discount percentage + % | Discount logo (Chinese site is \"discount\", other sites are empty) | | crypto_loan_interest | Interest rate discount percentage + % | \"\" | | alpha_voucher | Coupon face amount (including thousandths) | Alpha base currency (such as \"USDT\" or \"ETH\") | | Other types | Coupon face amount (including thousandths) | Capital currency symbol, such as \"USDT\" / \"GT\" / \"BTC\" | > Note: The point type additionally returns the origin_amount field (the original balance string with the trailing zeros removed), other types do not have this field. --- ### activation_info Exclusive fields for each type #### interest_voucher (leverage coupon) json { \"supported_pairs\": \"BTC/USDT\", \"transaction_type\": \"borrow\" } | Field | Type | Description | |------|------|------| | supported_pairs | string | Applicable trading pairs, separated by /, such as \"BTC/USDT\" | | transaction_type | string | Transaction type (such as borrow) | #### contract_bonus_new (contract experience coupon) json { \"received_expired_hour\": 48 } | Field | Type | Description | |------|------|------| | received_expired_hour | integer | The number of hours valid after activation (automatic recycling after timeout) | #### contract_bonus (Contract experience bonus) json { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false } | Field | Type | Description | |------|------|------| | check_unified_account_mode | boolean | Whether to check the unified account mode (fixed true) | | received_expired_days | integer | Number of days valid after activation | | abtest | boolean | AB test flag (currently fixed to false) | #### commission_rebate (handling fee cashback coupon) json { \"market\": \"futures\", \"market_name\": \"Futures\" } | Field | Type | Description | |------|------|------| | market | string | Applicable market, enumeration value: spot / margin / futures / alpha / etf / tradfi | | market_name | string | Market display name (i18n translated) | #### robot_bonus (robot experience bonus) json { \"designated_bots\": \"DISABLED\" } | Field | Type | Description | |------|------|------| | designated_bots | string | \"ENABLED\" = can only be used by specified policies; \"DISABLED\" = Unlimited strategy | #### position_voucher (position experience coupon) json { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"100\", \"position_bonus\": \"500\" } | Field | Type | Description | |------|------|------| | symbols | string | Applicable trading pairs (such as \"BTC_USDT\"), empty means no limit | | leverage | string | Leverage multiple | | need_user_funds | integer | 0 = No user-owned funds are required; 1 = Fund allocation is required | | user_funds_amount | string | The amount of funds required by the user (meaningful when need_user_funds=1) | | position_bonus | string | The original amount of the coupon (remove the trailing zero) | #### tradfi_position_voucher (TradFi position experience coupon) json { \"symbols\": \"AAPL\", \"leverage\": \"5\", \"position_bonus\": \"200\" } | Field | Type | Description | |------|------|------| | symbols | string | Applicable to TradFi varieties (such as \"AAPL\"), empty means no limit | | leverage | string | Leverage multiple | | position_bonus | string | The original amount of the coupon (remove the trailing zero) | #### etf_voucher (ETF trial bonus) json { \"currency_markets\": \"BTC3L_USDT,ETH3L_USDT\", \"amount\": \"50\" } | Field | Type | Description | |------|------|------| | currency_markets | string | List of applicable ETF markets (comma separated) | | amount | string | The original amount of the coupon (remove the trailing zero) | #### Other types point (point card), hold_bonus (financial experience fund), loss_protection_copier (worry-free money for following orders), vip_card (VIP experience card), p2p (P2P transaction coupon), cash (cash coupon) , crypto_loan_interest (interest-reduced coupon for mortgage loan), copy_trading (trading experience fee), alpha_voucher (Alpha cash coupon), financial_rate (interest-increasing coupon) and other types return empty objects: json {} --- ## Complete response example ### Ordinary cards and coupons (contract experience money) json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"contract_bonus\", \"name\": \"Futures Bonus\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"NOT_ACTIVE\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": { \"check_unified_account_mode\": true, \"received_expired_days\": 7, \"abtest\": false }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ### Task coupons (handling fee cashback coupons) json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"1000\", \"current_used\": \"350\", \"current_achived\": \"350\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"task_title\": \"Trade 1000 USDT to earn commission rebate\", \"task_desc\": \"Complete futures trading volume task to get 100 USDT commission rebate\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } } ### Point card (point) json { \"code\": 0, \"message\": \"Success\", \"data\": { \"next_page\": false, \"list\": [ { \"id\": 0, \"details_id\": 0, \"coupon_type\": \"point\", \"name\": \"Points\", \"amount\": \"1,234.56\", \"origin_amount\": \"1234.56\", \"currency\": \"POINT\", \"rule_new\": \"...\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/trade/BTC_USDT\", \"app\": \"/trade/BTC_USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 0, \"expire_time_order_by\": 0, \"expire_second\": 0, \"has_usage_history\": true, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [] } ] } }
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, GateApiException# Defining the host is optional and defaults to https://api.gateio.ws/api/v4# See configuration.py for a list of all supported configuration parameters.# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure APIv4 key authorizationconfiguration=gate_api.Configuration(
host="https://api.gateio.ws/api/v4",
key="YOU_API_KEY",
secret="YOUR_API_SECRET"
)
api_client=gate_api.ApiClient(configuration)
# Create an instance of the API classapi_instance=gate_api.CouponApi(api_client)
expired=0# int | Coupon status filter. `0` = query valid coupons (default); `1` = query expired/used coupons (optional) (default to 0)limit=10# int | Number of coupons returned per page, range 1-20, default 10 (optional) (default to 10)last_id=56# int | Cursor-based pagination: the `id` value of the last record from the previous page, omit (or pass 0) for the first page (optional)expire_time=56# int | Cursor-based pagination: used together with `last_id`, pass the `expire_time_order_by` value of the last record from the previous page (Unix timestamp), omit for the first page (optional)order_by='latest'# str | Sort order. `latest` = by latest claim time descending (default); `expired` = by expiration time ascending (optional) (default to 'latest')type='type_example'# str | Coupon type filter. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) (optional)is_task_coupon=56# int | Task Coupon Filter. `0` = Return only regular coupons; `1` = Return only task coupons; Omit to return both (optional)try:
# Coupon Center listapi_response=api_instance.list_user_coupons(expired=expired, limit=limit, last_id=last_id, expire_time=expire_time, order_by=order_by, type=type, is_task_coupon=is_task_coupon)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling CouponApi->list_user_coupons: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| expired | int | Coupon status filter. `0` = query valid coupons (default); `1` = query expired/used coupons | [optional] [default to 0] |
| limit | int | Number of coupons returned per page, range 1-20, default 10 | [optional] [default to 10] |
| last_id | int | Cursor-based pagination: the `id` value of the last record from the previous page, omit (or pass 0) for the first page | [optional] |
| expire_time | int | Cursor-based pagination: used together with `last_id`, pass the `expire_time_order_by` value of the last record from the previous page (Unix timestamp), omit for the first page | [optional] |
| order_by | str | Sort order. `latest` = by latest claim time descending (default); `expired` = by expiration time ascending | [optional] [default to 'latest'] |
| type | str | Coupon type filter. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) | [optional] |
| is_task_coupon | int | Task Coupon Filter. `0` = Return only regular coupons; `1` = Return only task coupons; Omit to return both | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - |
[Back to top][Back to API list][Back to Model list][Back to README]
GetUserCouponDetailResponse get_user_coupon_detail(coupon_type, detail_id, is_task_coupon=is_task_coupon)
Coupon Center details
Interface description The general details interface of the card and coupon center returns the complete detailed information of a single card and coupon. Compared with the list interface, it additionally includes: usage rule text, block-based card and coupon detailed attributes (extra), and source completion task information (from_task). ## Query Parameters | Parameter name | Type | Required | Constraints | Description | | ---------------- | ------- | --- | --------------------- | ------------------------------------------------- | | coupon_type | string | Yes | See coupon type enumeration | Coupon type, the value is the same as coupon-list has the same interface | | detail_id | integer | Yes | min:1, max:2147483647 | Ordinary card and coupon transfer details_id; the id of the task card and coupon transfer record (i.e. the id field in the list) | | is_task_coupon | integer | no | 0 or 1, default 0 | 0 = Ordinary coupons; 1 = mission coupons | > Note: The detail_id semantics of ordinary coupons and mission coupons are different. > > - Ordinary cards and coupons: detail_id = the primary key of each type of user card and coupon table (details_id in the list) > - Task coupon: detail_id = primary key of issuance record table (id in the list) --- ##Response ### Outer structure json { \"code\": 0, \"message\": \"\", \"data\": { ...card details object... } } ### Details object fields The details interface returns the same basic fields as the list interface, with differences in the following fields: rule_new | Field name | Type | Difference from list | Description | | ------------------- | ------- | ----------------- | -------------------------------------------- | | rule_new | string | Value (the list returns an empty string) | Card and coupon usage rule text (i18n translation) | | extra | array | Value (list returns []) | For the detailed attributes of the cards and coupons in the partitions, please see the description below | | from_task | boolean | New field | Ordinary coupons redeemed by completing tasks (sub-coupons automatically issued after the task is completed) | | task_start_at | integer | May have value | Task coupon: task start timestamp; ordinary coupon (from_task=true): start time of the source task | | task_expire_at | integer | May have value | Task coupons: receive the validity expiration timestamp (0 means no limit); ordinary cards and coupons are fixed 0 | | task_completed_at | integer | May have value | Task coupon: task completion timestamp; ordinary coupon (from_task=true): completion time of the source task | The remaining basic fields (id, details_id, coupon_type, name, amount, currency, status, jump_url, help_url, expire_time, expire_second, has_ progress, progress_config, activation_info, is_task_coupon, upgrade_toast, task_title, task_desc) are exactly the same as the list interface (listUserCoupons). --- ## extra field description extra is a two-dimensional array, composed of several "blocks", and the front end displays them separately by blocks. extra = [ [block1_item1, block1_item2, ...], // Block 1: Card name/source/status [block2_item1, block2_item2, ...], // Block 2: Core attributes of cards and coupons [block3_item1, block3_item2, ...], // Block 3: time information ] ### The structure of each item in extra | Field | Type | Description | | ------- | ---------------- | --------------- | | type | string | Display type, enumeration values are shown in the table below | | key | string | Label text (i18n translated) | | value | string / integer | Value, type changes with type | ### type enumeration | type value | value type | description | | ----------- | ---------- | ------------------------ | | string | string | Normal text display | | timestamp | integer | Unix timestamp, the front end is responsible for formatting into date and time | | day | integer | Number of days (integer) | | hour | integer | Number of hours (integer) | | status | string | Status enum value (same meaning as status field) | | btn | string | With jump button, value is the button copy | --- ## Block 1 (fixed): Coupon name/source/status All types (except point) contain this block, the fixed fields are as follows: | Serial number | type | key (translation key) | value | Remarks | | --- | -------- | ----------------------------- | ------- | --------- | | 1 | string | COUPON_VOUCHER_NAME (coupon name) | Coupon name text | Required | | 2 | string | COUPON_VOUCHER_SOURCE (coupon source) | Source activity name | Return this item only if there is a source | | 3 | status | COUPON_STATUS (coupon status) | Status enumeration value | Required | > extra of type point (point card) is fixed to an empty array []. --- ## Block 2 + Block 3: Exclusive fields for each type ### contract_bonus (contract experience bonus) Block 2: Core Attributes | type | key | value Description | | -------- | ----------------------------- | -------------- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + space + currency | Block 3: Time Information | type | key | value description | condition | | ----------- | --------------------------------- | ---------- | ----- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_ACTIVATION_PERIOD (activation validity period) | Activation expiration timestamp | Required | | day | COUPON_USAGE_DURATION (duration of use) | Number of days valid after activation | Required | | timestamp | COUPON_ACTIVATION_TIME (activation time) | activation timestamp | only if activated | --- ### contract_bonus_new (contract experience coupon) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ------------------------------------ | ------------------ | ------- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + space + currency | Required | | string | COUPON_MAXIMUM_LEVERAGE (maximum leverage) | NX or Unlimited | Required | | string | COUPON_LIMITED_TRADING_PAIR (limited trading pair) | Trading pair list | When there are limited trading pairs | Block 3: Time Information | type | key | value description | condition | | ----------- | --------------------------------- | ---------- | ---- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_ACTIVATION_PERIOD (activation validity period) | Activation expiration timestamp | Required | | hour | COUPON_USAGE_DURATION (duration of use) | Number of hours valid after activation | Required | | timestamp | COUPON_ACTIVATION_TIME (activation time) | Activation timestamp | When activated | --- ### commission_rebate (handling fee cashback coupon) Block 2: Core Attributes | type | key | value description | condition | | -------- | -------------------------------- | -------------- | --- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + space + currency | Required | | string | COUPON_REBATE_PERCENTAGE (cashback ratio) | N% | Required | | string | COUPON_BALANCE (remaining balance) | amount + space + currency | Required | | string | COUPON_USED_AMOUNT (used amount) | Amount + space + currency | Required | | string | COUPON_APPLICABLE_MARKET (applicable market) | Market name | Required | Block 3: Time Information | type | key | value Description | Conditions | | ----------- | --------------------------------- | ---------- | --------------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_ACTIVATION_PERIOD (activation validity period) | Activation expiration timestamp | Vouchers that require activation are displayed | | day | COUPON_USAGE_DURATION (duration of use) | Number of days valid after activation | Required | | timestamp | COUPON_ACTIVATION_TIME (activation time) | Activation timestamp | When the status is activated/used/expired | --- ### hold_bonus (Financial Management Experience Bonus) Block 2: Core Attributes | type | key | value Description | | -------- | ----------------------------- | -------------- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + space + currency | Block 3: Time information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### financial_rate (interest rate coupon) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ------------------------------------------ | ----------------------- | --- | | string | COUPON_RATE_UP_CAP (rate increase cap) | amount + currency or Unlimited | Required | | string | COUPON_RATE_UP_APR (rate increase ratio) | N%APR | Required | | string | COUPON_RATE_UP_TERM_DAYS (number of days to increase interest rate) | N days or Unlimited | Required | | string | COUPON_AVAILABLE_INVESTMENT_TYPE (available financial management type) | Such as Lend & Earn | required | | string | COUPON_AVAILABLE_PRODUCTS (available products) | List of product names (comma separated) | Required | | string | COUPON_MINIMUM_INVESTMENT_UP (minimum purchase amount) | ≥ Amount Currency or interval | required | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### robot_bonus (robot experience bonus) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ------------------------------------ | ------------------------ | ---------- | | string | COUPON_VOUCHER_AMOUNT (coupon amount) | amount + space + Currency | Required | | string | COUPON_APPLICABLE_BOTS (for robots) | such as Future Grids | Unlimited robot time | | string | COUPON_MAXIMUM_LEVERAGE (maximum leverage multiple) | Multiples | Unlimited and with leverage restrictions | | string | COUPON_LIMITED_TRADING_PAIR (limited trading pair) | Trading pair or All | When not limited to robots | | string | COUPON_STOP_LOSS_AMOUNT (stop loss amount) | Amount + Currency | When there is a stop loss amount | | btn | COUPON_DESIGNATED_BOTS (limited to bots) | ViewMyaccountLeft Button copy | When limited to robots | | day | COUPON_RUNTIME_DURATION (running duration) | Number of days | required | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### loss_protection_copier (worry-free money for following orders) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ----------------------------------- | ------------------- | ------------ | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + space + currency | Required | | string | COUPON_APPLICABLE_MARKET (where applicable) | Contract or Spot | Required | | string | COUPON_MINIMUM_INVESTMENT (minimum order amount) | amount + currency | When there is a minimum amount limit | | string | COUPON_AVAILABLE_TRADERS (available traders) | Nickname list | When Partially Available (Designated Trader) | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------ | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | use timestamp | when there is use time | --- ### position_voucher (position experience coupon) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ------------------------------------ | ----------------- | ------- | | string | COUPON_VOUCHER_AMOUNT (coupon amount) | Amount × Leverage + Space + Currency | Required | | string | COUPON_APPLICABLE_MARKET (applicable market) | USDT Perpetual Contract | Required | | hour | COUPON_POSITION_DURATION (position duration) | Number of hours | Required | | string | COUPON_LEVERAGE (leverage multiple) | NX | Required | | string | COUPON_LIMITED_TRADING_PAIR (limited trading pair) | Trading pair, empty means no limit | Required | | string | COUPON_USER_INVESTMENT_QUOTA (capital quota) | amount + currency | When user allocation is required | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### tradfi_position_voucher (TradFi position experience coupon) Block 2: Core Attributes | type | key | value Description | | -------- | ------------------------------------ | ----------------- | | string | COUPON_VOUCHER_AMOUNT (coupon amount) | Amount × Leverage + Space + Currency | | string | COUPON_POSITION_DURATION (position duration) | N trading days | | string | COUPON_LIMITED_TRADING_PAIR (limited trading pair) | TradFi varieties | | string | COUPON_LEVERAGE (leverage multiple) | Nx | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### vip_card (VIP experience card) Block 2: Core Attributes | type | key | value Description | | -------- | ------------------------------- | ---------- | | string | COUPON_VIP_TIER (VIP level) | VIPN | | day | COUPON_BENEFIT_DURATION (benefits duration) | Number of days | Block 3: Time information | type | key | value Description | Conditions | | ----------- | --------------------------------- | ---------- | ----------- | | timestamp | COUPON_OBTAINED_AT (get time) | Create timestamp | Required | | timestamp | COUPON_ACTIVATION_PERIOD (activation validity period) | Activation expiration timestamp | Required | | timestamp | COUPON_ACTIVATION_TIME (activation time) | Activation timestamp | When the status is used or expired | | timestamp | COUPON_EXPIRY_TIME (expiration time) | Expiration timestamp | When the status is used or expired | --- ### p2p (P2P transaction discount coupon) Block 2: Core Attributes | type | key | value Description | | -------- | ------------------------------- | -------------- | | string | COUPON_DEDUCTION_LIMIT (deduction limit) | amount + currency | | string | COUPON_DEDUCTION_RATIO (discount ratio) | N% | | string | COUPON_USAGE_CONDITIONS (conditions of use) | No less than N currencies per transaction | | string | COUPON_SUPPORTED_FIAT (for fiat currencies) | Fiat currency list or all | Block 3: Time information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### interest_voucher (leverage coupon) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | --------------------------------------- | ----------------- | -------- | | string | max_discount_amount (maximum discount amount) | amount + currency | Required | | string | COUPON_APPLICABLE_TRADES (applicable transactions) | Isolated Margin | Required | | string | COUPON_INTEREST_DISCOUNT (reduction ratio) | N% | Required | | string | COUPON_LIMITED_TRADING_PAIR (limited trading pair) | Trading pair, empty means no limit | Required | | string | COUPON_BALANCE (remaining balance) | amount + currency | Required | | string | COUPON_BORROWING_AMOUNT_LIMIT (borrowing amount limit) | Borrowing amount range | When there is a limit on the borrowing amount | | hour | COUPON_VALIDITY_PERIOD (reduction time) | Number of hours | When set | Block 3: Time Information | type | key | value Description | Conditions | | ----------- | ------------------------------------- | ---------- | -------------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | When the status is pending or expired | | timestamp | COUPON_EFFECTIVE_TIME (reduction start time) | Start using timestamp | When the status is invalid/in use/used | | timestamp | COUPON_DISCOUNT_EXPIRY_TIME (reduction expiry time) | Reduction expiration timestamp | When the status is invalid/in use/used | --- ### cash (cash coupon) Block 2: Core Attributes | type | key | value Description | | -------- | ----------------------------- | ---------- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + currency | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------ | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When there is a redemption time | --- ### crypto_loan_interest (Mortgage loan interest coupon) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ---------------------------------------------- | ---------- | -------- | | string | coupon_center_discount_max_amount (maximum discount amount) | amount + currency | Required | | string | COUPON_INTEREST_DISCOUNT (reduction ratio) | N% | Required | | string | coupon_center_loan_min_amount (minimum loan amount) | amount + currency | When there is a minimum amount requirement | | hour | coupon_center_interest_discount_period (discount duration) | Number of hours | Required | | string | coupon_center_trade_applicable (applicable transactions) | demand deposit | Required | Block 3: Time information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### copy_trading (Following experience bonus) Block 2: Core Attributes | type | key | value Description | Conditions | | -------- | ---------------------------------- | ------------------- | ---- | | string | COUPON_VOUCHER_AMOUNT (face value) | amount + currency | Required | | string | coupon_applicable_traders (applicable traders) | all or specified traders | Required | | string | coupon_trade_category (applicable transaction type) | Spot or Contract | Required | | day | coupon_usage_days (the number of days the experience is valid) | Number of days | Required | | string | COUPON_STOP_LOSS_AMOUNT (stop loss amount) | amount + currency | Required | | string | coupon_ineligible_mkts (cannot experience the market) | Market list | When there are restrictions | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------- | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When the status is used | --- ### alpha_voucher (Alpha cash coupon) Block 2: Core Attributes | type | key | value Description | | -------- | ----------------------------- | ---------- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + currency | Block 3: Time Information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------ | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | Use timestamp | When there is a collection time | --- ### etf_voucher (ETF trial bonus) Block 2: Core Attributes | type | key | value Description | | -------- | ------------------------------------ | ---------- | | string | COUPON_VOUCHER_AMOUNT (voucher amount) | amount + currency | | hour | coupon_trial_duration (trial duration) | Number of hours | | string | COUPON_LIMITED_TRADING_PAIR (limited trading pair) | ETF market list | Block 3: Time information | type | key | value description | condition | | ----------- | -------------------------- | ---------- | ------ | | timestamp | COUPON_OBTAINED_AT (get time) | Get timestamp | Required | | timestamp | COUPON_VALID_UNTIL (expiration time) | Expiration timestamp | Required | | timestamp | COUPON_USED_AT (use time) | use timestamp | when there is use time | --- ### point (point card) extra always returns [] without any blocks. --- ## Complete response example ### Ordinary cards and coupons (handling fee cashback coupons) json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 1234567, \"details_id\": 890, \"coupon_type\": \"commission_rebate\", \"name\": \"10% Futures Commission Rebate\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Rebate up to 100% of futures trading fee within 30 days.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/futures/USDT\", \"app\": \"/futures/USDT\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 86400, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"100\", \"current_used\": \"30\", \"current_achived\": \"30\", \"currency\": \"USDT\" }, \"activation_info\": { \"market\": \"futures\", \"market_name\": \"Futures\" }, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"10% Futures Commission Rebate\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"Card coupon amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Cashback ratio\", \"value\": \"10%\" }, { \"type\": \"string\", \"key\": \"Remaining Amount\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Used quota\", \"value\": \"0 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable markets\", \"value\": \"Futures\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"day\", \"key\": \"duration\", \"value\": 30 } ] ] } } ### Task coupons (position experience coupons) json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 9876543, \"details_id\": 0, \"coupon_type\": \"position_voucher\", \"name\": \"position experience coupon\", \"amount\": \"5,000\", \"currency\": \"USDT\", \"rule_new\": \"Experience the position coupon rules...\", \"status\": \"TASK_WAIT\", \"jump_url\": { \"web\": \"https://www.gate.io/futures\", \"app\": \"gateio://futures\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 172800, \"has_usage_history\": false, \"has_progress\": true, \"progress_config\": { \"total_balance\": \"10000\", \"current_used\": \"3000\", \"current_achived\": \"3000\", \"currency\": \"USDT\" }, \"activation_info\": { \"symbols\": \"BTC_USDT\", \"leverage\": \"10\", \"need_user_funds\": 0, \"user_funds_amount\": \"\", \"position_bonus\": \"500\" }, \"is_task_coupon\": 1, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"Complete 10,000 USDT contract trading volume and obtain position experience coupon\", \"task_desc\": \"Complete the specified trading volume task in the perpetual contract\", \"task_start_at\": 1757000000, \"task_expire_at\": 1760000000, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Card name\", \"value\": \"position experience coupon\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TASK_WAIT\" } ], [ { \"type\": \"string\", \"key\": \"Coupon amount\", \"value\": \"5,000 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable market\", \"value\": \"USDT perpetual contract\" }, { \"type\": \"hour\", \"key\": \"position duration\", \"value\": 24 }, { \"type\": \"string\", \"key\": \"Leverage multiple\", \"value\": \"10X\" }, { \"type\": \"string\", \"key\": \"Limited trading pairs\", \"value\": \"BTCUSDT\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 } ] ] } } ### P2P transaction coupon (p2p) json { \"code\": 0, \"message\": \"\", \"data\": { \"id\": 5678901, \"details_id\": 234, \"coupon_type\": \"p2p\", \"name\": \"5.5% P2P transaction discount coupon\", \"amount\": \"100\", \"currency\": \"USDT\", \"rule_new\": \"Each P2P transaction can deduct up to 100 USDT in handling fees, with a discount rate of 5.5%, and each transaction is not less than 200 USDT.\", \"status\": \"TO_BE_USED\", \"jump_url\": { \"web\": \"/p2p\", \"app\": \"gateio://p2p\", \"mini_app\": \"\" }, \"help_url\": { \"web\": \"\", \"app\": \"\" }, \"expire_time\": 1760000000, \"expire_time_order_by\": 1760000000, \"expire_second\": 2592000, \"has_usage_history\": false, \"has_progress\": false, \"progress_config\": { \"total_balance\": \"\", \"current_used\": \"\", \"current_achived\": \"\", \"currency\": \"\" }, \"activation_info\": {}, \"is_task_coupon\": 0, \"upgrade_toast\": false, \"from_task\": false, \"task_title\": \"\", \"task_desc\": \"\", \"task_start_at\": 0, \"task_expire_at\": 0, \"task_completed_at\": 0, \"extra\": [ [ { \"type\": \"string\", \"key\": \"Coupon name\", \"value\": \"5.5% P2P transaction discount coupon\" }, { \"type\": \"string\", \"key\": \"Card and coupon source\", \"value\": \"New user registration activity\" }, { \"type\": \"status\", \"key\": \"Card and coupon status\", \"value\": \"TO_BE_USED\" } ], [ { \"type\": \"string\", \"key\": \"deduction limit\", \"value\": \"100 USDT\" }, { \"type\": \"string\", \"key\": \"Discount ratio\", \"value\": \"5.5%\" }, { \"type\": \"string\", \"key\": \"Usage conditions\", \"value\": \"Each transaction must not be less than 200 USDT\" }, { \"type\": \"string\", \"key\": \"Applicable legal currency\", \"value\": \"CNY, USD\" } ], [ { \"type\": \"timestamp\", \"key\": \"Get time\", \"value\": 1757000000 }, { \"type\": \"timestamp\", \"key\": \"expiration time\", \"value\": 1760000000 } ] ] } } --- ## Error code | code | Description | | -------------------------------------------- | ------------------------- | | 0 | Success | | 10001(COUPON_SEND_ISSUING_LOG_NOT_FOUND) | The card and coupon record does not exist or does not belong to the current user | | 10000 (PARAMS_INVALID) | The parameter is invalid (such as the task card is missing coupon_info) | | 50105 (INVALID_PARAMETERS) | Input parameter verification failed (such as coupon_type illegal) |
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, GateApiException# Defining the host is optional and defaults to https://api.gateio.ws/api/v4# See configuration.py for a list of all supported configuration parameters.# The client must configure the authentication and authorization parameters# in accordance with the API server security policy.# Examples for each auth method are provided below, use the example that# satisfies your auth use case.# Configure APIv4 key authorizationconfiguration=gate_api.Configuration(
host="https://api.gateio.ws/api/v4",
key="YOU_API_KEY",
secret="YOUR_API_SECRET"
)
api_client=gate_api.ApiClient(configuration)
# Create an instance of the API classapi_instance=gate_api.CouponApi(api_client)
coupon_type='coupon_type_example'# str | Coupon type enum. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus)detail_id=56# int | Coupon ID. **Regular coupon**: pass `details_id` from the list (primary key of each type's user coupon table); **Task coupon**: pass `id` from the list (primary key of the distribution record table)is_task_coupon=0# int | Coupon source type. `0` = regular coupon (default); `1` = task coupon. This parameter determines the query logic for `detail_id` (optional) (default to 0)try:
# Coupon Center detailsapi_response=api_instance.get_user_coupon_detail(coupon_type, detail_id, is_task_coupon=is_task_coupon)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling CouponApi->get_user_coupon_detail: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| coupon_type | str | Coupon type enum. If not specified, all supported types are returned. Available values: `position_voucher` (position voucher), `tradfi_position_voucher` (TradFi position voucher), `contract_bonus` (futures bonus), `contract_bonus_new` (futures trial coupon), `commission_rebate` (commission rebate coupon), `hold_bonus` (earn trial bonus), `point` (point card), `financial_rate` (interest rate boost coupon), `robot_bonus` (trading bot bonus), `loss_protection_copier` (copy trading loss protection), `vip_card` (VIP trial card), `interest_voucher` (margin interest discount coupon), `p2p` (P2P trading deduction coupon), `cash` (cash coupon), `crypto_loan_interest` (crypto loan interest discount coupon), `copy_trading` (copy trading bonus), `alpha_voucher` (Alpha cash coupon), `etf_voucher` (ETF trial bonus) | |
| detail_id | int | Coupon ID. Regular coupon: pass `details_id` from the list (primary key of each type's user coupon table); Task coupon: pass `id` from the list (primary key of the distribution record table) | |
| is_task_coupon | int | Coupon source type. `0` = regular coupon (default); `1` = task coupon. This parameter determines the query logic for `detail_id` | [optional] [default to 0] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - |
[Back to top][Back to API list][Back to Model list][Back to README]