Discount

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.

get-discount-list

Getting list from discounts DB table

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/discounts
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

post-discount

Store row to discounts DB table

SecurityAuthorization
Request
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw (json)

cryptocurrency
string
is_one_time
string
object
currency
string
Responses
200

Success

401

Unauthorized

403

Forbidden

422

Unprocessable Content

post/discounts
Request samples
application/json
{
  • "cryptocurrency": "BTC",
  • "is_one_time": "TRUE",
  • "volumes": {
    },
  • "currency": "TBTC"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

get-discount

Getting exact row from discounts DB table using discount_id

SecurityAuthorization
Request
path Parameters
discount_id
required
string

discount_id path parameter

Example: <discount_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

401

Unauthorized

403

Forbidden

get/discounts/{discount_id}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

put-discount

Update exact row from discounts DB table using discount_id

SecurityAuthorization
Request
path Parameters
discount_id
required
string

path parameter header for JWT

Example: <discount_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Request Body schema: application/json
required

raw (json)

cryptocurrency
string
is_one_time
string
object
currency
string
Responses
200

Success

401

Unauthorized

403

Forbidden

put/discounts/{discount_id}
Request samples
application/json
{
  • "cryptocurrency": "BTC",
  • "is_one_time": "TRUE",
  • "volumes": {
    },
  • "currency": "GTETH"
}
Response samples
application/json
{
  • "api_message": "<string>",
  • "api_data": {
    }
}

delete-discount

Delete exact row from discounts DB table using discount_id

SecurityAuthorization
Request
path Parameters
discount_id
required
string

discount_id path parameter

Example: <discount_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
204

No Content (Success)

401

Unauthorized

403

Forbidden

delete/discounts/{discount_id}
Response samples
application/json
{ }

get-exact-user-discount

Getting exact row from discounts DB table using discount_id

SecurityAuthorization
Request
path Parameters
discount_attach_id
required
string

discount_attach_id path parameter

Example: <discount_attach_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

get/dicounts/userDiscount/{discount_attach_id}

get-exact-company-discount

Getting exact row from discounts DB table using discount_id

SecurityAuthorization
Request
path Parameters
discount_attach_id
required
string

discount_attach_id path parameter

Example: <discount_attach_id>
header Parameters
Authorization
required
string

auth header for JWT

Example: <JWT token>
username
required
string

auth header for username

Example: <username>
Responses
200

Success

get/dicounts/companyDiscount/{discount_attach_id}