This section give's control over the trade discounts.
Discount can be applied to any trade action (Buy / Sell) and give discount by fixed amount / min. amount
After creating a discount,It must be attached to a specific user / company to get applied at trade checkout.
Admin logged in - can see,create and control all of the discount's,attach them to any user / company.
User logged in - can see it's attached discount's in case he has any,at trade checkout.
Getting list from discounts DB table
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": {
- "last_at": "<datetime string>",
- "total_items": 1,
- "deposits": {
- "id": "<string>",
- "user_id": "<string>",
- "from_address": "<string>",
- "to_address": "<string>",
- "amount": 1,
- "currency": "<string>",
- "type": "<string>",
- "action": "<string>",
- "status": "<string>",
- "match": true,
- "tx_hash": "<string>",
- "ip": "<string>",
- "created_by_id": "<string>",
- "created_at": "<string>",
- "updated_at": "<string>",
- "wallet_id": "<string>",
- "address": "<string>",
- "wallet_updated_at": "<datetime string>",
- "wallet_created_at": "<datetime string>"
}
}
}
Store row to discounts DB table
Success
Unauthorized
Forbidden
Unprocessable Content
{- "cryptocurrency": "BTC",
- "is_one_time": "TRUE",
- "volumes": {
- "discount": [
- {
- "volume": 0,
- "type": "fixed",
- "amount": 55
}
]
}, - "currency": "TBTC"
}
{- "api_message": "<string>",
- "api_data": {
- "discount": [
- {
- "id": "<string>",
- "user_id": "<string>",
- "discount_id": "<string>",
- "status": true,
- "is_gross": true,
- "expiry_date": "<datetime string>",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 1
}
]
}
}
]
}
}
Getting exact row from discounts DB table using discount_id
Success
Unauthorized
Forbidden
{- "api_message": "<string>",
- "api_data": {
- "deposits": {
- "id": "<string>",
- "user_id": "<string>",
- "discount_id": "<string>",
- "status": true,
- "is_gross": true,
- "expiry_date": "<datetime string>",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 1
}
]
}
}
}
}
Update exact row from discounts DB table using discount_id
raw (json)
Success
Unauthorized
Forbidden
{- "cryptocurrency": "BTC",
- "is_one_time": "TRUE",
- "volumes": {
- "discount": [
- {
- "volume": 0,
- "type": "fixed",
- "amount": 55
}
]
}, - "currency": "GTETH"
}
{- "api_message": "<string>",
- "api_data": {
- "discount": {
- "id": "<string>",
- "user_id": "<string>",
- "discount_id": "<string>",
- "status": true,
- "is_gross": true,
- "expiry_date": "<datetime string>",
- "created_at": "<datetime string>",
- "updated_at": "<datetime string>",
- "is_one_time": true,
- "currency": "<string>",
- "volumes": {
- "discount": [
- {
- "volume": 1,
- "type": "<string>",
- "amount": 1
}
]
}
}
}
}