hnc-revolution also provides private HTTP APIs which allow read / write access to your private account using personal access token for following functionalities…
Register a new user. Required POST method and request post data are "first_name", "last_name", "email", "username", "password", "password_confirmation", "check_agreement". If successful, the method will return user profile detail and personal access token.
Register Endpoint: https://yourdomain.com/api/register
Field | Description |
first_name | Required - Set user's first name |
last_name | Required - Set user's last name |
Required - Set user's email | |
username | Required - Set user's username |
password | Required - Set user's password |
password_confirmation | Required - Confirm user's password |
check_agreement | Required - Check registration's terms and policy |
curl -v -X POST https://yourdomain.com/api/register \ -H "Content-Type: application/json" \ -d '{ "first_name": "Jhon", "last_name": "Doe", "email": "[email protected]", "username": "jhondoe", "password": "123456789", "password_confirmation": "123456789", "check_agreement": 1 }'
{ "success": true, "message": "The registration was successful. Please check your email to verify your account.", "data": { "user": { "email": "[email protected]", "username": "jhondoe", "referral_code": "fcdd3595-6ebe-4668-a65b-6444344eae1a", "assigned_role": "user", "id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "updated_at": "2020-11-12T09:13:38.000000Z", "created_at": "2020-11-12T09:13:38.000000Z", "profile": { "id": "d2354e68-858c-4353-96ed-84cb22fa5af2", "user_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "first_name": "Jhon", "last_name": "Doe", "address": null, "phone": null, "created_at": "2020-11-12T09:13:38.000000Z", "updated_at": "2020-11-12T09:13:38.000000Z" } }, "access_token": "1|5mao11TRVlzCqF3JVAlPAw7aEJWfKUd2UjVjcqfC" } }
{"success": false,"message": "Failed to register."}
Sends user's login request. Required POST method and request post data are "username", "password". If successful, the method will return personal access token.
Login Endpoint: https://yourdomain.com/api/login
Field | Description |
username | Required - Set user's username |
password | Required - Set user's password |
curl -v -X POST https://yourdomain.com/api/login \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]", "username": "jhondoe", "password": "123456789" }'
{ "success": true, "message": "Login is successful.", "data": { "access_token": "2|qL8HUXM4uz0hLS0GHjGeB1bsAQPDmUSfOzDFQu83" } }
{ "success": false, "message": "Failed to login." }
Sends request for restore user's forgotten password. Required POST method and request post data are "email". If successful, the method will return verifier hash code.
Get Forget Password Link/Code Endpoint: https://yourdomain.com/api/forget-password
Field | Description |
Required - Set user's email |
curl -v -X POST https://yourdomain.com/api/forget-password \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]" }'
{ "success": true, "message": "Password reset link is sent to your email address.", "data": { "verifier_hash_code": "$2y$10$UoxFJl4pD3/GWNR6x0z2KepfhalTaW.xuUcDgUv0r0cR3XZj/RaNK" } }
{ "success": false, "message": "Failed! Your account is deleted by admin." }
Sends request for set new password. Required POST method and request post data are "new_password", "password_confirmation", "verification_code", "email", "verifier_hash_code". If successful, the method will return verifier hash code.
Set New Password Endpoint: https://yourdomain.com/api/forget-password/set-password
Field | Description |
new_password | Required - Set user's new password |
password_confirmation | Required - Confirm user's password |
verification_code | Required - The Verification code given by user which was sent to user's registered email |
Required - Set user's registered email | |
verifier_hash_code | Required - Provide verifier hash code from "Get Forget Password Request" |
curl -v -X POST https://yourdomain.com/api/forget-password \ -H "Content-Type: application/json" \ -d '{ "new_password" : "123456789", "password_confirmation" : "123456789", "verification_code" : "123456", "email" : "[email protected]", "verifier_hash_code" : "$2y$10$Hy5KxTxLOREsrvjZnhBut.hcrg9w2EaxZZVIJTRsM9fO5uhw.d97y" }'
{ "success": true, "message": "New password is updated. Please login your account." }
{ "success": false, "message": "The verifier has code is invalid." }
Sends request for verification user's email. Required POST method and request post data are "email". If successful, the method will return verifier hash code.
Get Email Verification Link/Code Endpoint: https://yourdomain.com/api/verification/email
Field | Description |
Required - Set user's email |
curl -v -X POST https://yourdomain.com/api/verification/email \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]" }'
{ "success": true, "message": "Email verification link is sent successfully.", "data": { "verifier_hash_code": "$2y$10$yh6b9vUFTi1B4Jywdc/YbuYMWQs.Wkl.STSikyt6ZNQYnMGIBndbG", "email": "[email protected]" } }
{ "success": false, "message": "The given email address is already verified." }
Sends request to verify code sent to user's email. Required POST method and request post data are "email", "verifier_hash_code", "verification_code". If successful, the method will return verifier hash code.
Verify Email Verification Code Endpoint: https://yourdomain.com/api/verification/verify-email-code
Field | Description |
Required - Set user's email | |
verifier_hash_code | Required - Provide verifier hash code from "Get Email Verification Request" response |
verification_code | Required - The Verification code given by user which was sent to user's registered email |
curl -v -X POST https://yourdomain.com/api/verification/verify-email-code \ -H "Content-Type: application/json" \ -d '{ "email": "[email protected]" }'
{ "success": true, "message": "Your account has been verified successfully." }
{ "success": false, "message": "The verifier has code is invalid." }
Sends request to get user profile detail. Required GET method with Bearer/Access Token in HEADER request. If successful, the method will return profile detail.
Get Profile Detail Endpoint: https://yourdomain.com/api/user/profile/show
curl -v -X POST https://yourdomain.com/api/user/profile/show \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "user": { "id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "assigned_role": "user", "referrer_id": null, "referral_code": "fcdd3595-6ebe-4668-a65b-6444344eae1a", "username": "jhondoe", "email": "[email protected]", "avatar": null, "google2fa_secret": null, "is_id_verified": 0, "is_email_verified": 0, "is_financial_active": 1, "is_accessible_under_maintenance": 0, "is_super_admin": 0, "status": "active", "created_by": null, "created_at": "2020-11-12T09:13:38.000000Z", "updated_at": "2020-11-12T09:13:38.000000Z", "preference": null, "profile": { "id": "d2354e68-858c-4353-96ed-84cb22fa5af2", "user_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "first_name": "Jhon", "last_name": "Doe", "address": null, "phone": null, "created_at": "2020-11-12T09:13:38.000000Z", "updated_at": "2020-11-12T09:13:38.000000Z" } } } }
{ "message": "Unauthenticated." }
Sends request to update user profile detail. Required PUT method with Bearer/Access-Token in HEADER request and form data are "first_name", "last_name", "address". If successful, the method will return success message.
Update Profile Detail Endpoint: https://yourdomain.com/api/user/profile/update
Field | Description |
first_name | Required - Set user's first name |
last_name | Required - Set user's last name |
address | Optional - Set user's address |
curl -v -X PUT https://yourdomain.com/api/user/profile/update \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "first_name": "Jhon", "last_name": "Doe", }'
{ "success": true, "message": "Profile has been updated successfully." }
{ "message": "Unauthenticated." }
Sends request to update user profile detail. Required POST method with Bearer/Access-Token in HEADER request and form data are "avatar". If successful, the method will return success message and the updated avatar url.
Change Profile Avatar Endpoint: https://yourdomain.com/api/user/profile/avatar/update
Field | Description |
avatar | Required - Set user's first name |
curl -v -X POST https://yourdomain.com/api/user/profile/avatar/update \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "avatar": "file" }'
{ "success": true, "message": "Avatar has been uploaded successfully.", "data": { "avatar": "urlOfUpdatedAvatar" } }
{ "success": false, "message": "Failed to upload the avatar." }
Sends request to change user password. Required PUT method with Bearer/Access-Token in HEADER request and form data are "password", "new_password", "new_password_confirmation". If successful, the method will return success message.
Change Password Endpoint: https://yourdomain.com/api/user/password/update
Field | Description |
password | Required - Set user's old password |
new_password | Required - Set user's new password |
new_password_confirmation | Required - Confirm new password |
curl -v -X PUT https://yourdomain.com/api/user/password/update \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "password": "123456789", "new_password": "123456789", "new_password_confirmation": "123456789" }'
{ "success": true, "message": "Password has been changed successfully." }
{ "success": false, "message": "Failed to change the password." }
Sends request to get profile preference. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return profile preference detail.
Get Preference Endpoint: https://yourdomain.com/api/user/password/update
curl -v -X GET https://yourdomain.com/api/user/preference/show \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
{ "success": true, "data": { "preference": { "user_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "default_language": "en", "default_coin_pair": null, "id": "82d30318-fa9c-42ad-a992-afa87337c324" } } }
{ "message": "Unauthenticated." }
Sends request to update user preference. Required PUT method with Bearer/Access-Token in HEADER request and form data are "display_language", "default_coin_pair". If successful, the method will return success message.
Update Preference Endpoint: https://yourdomain.com/api/user/preference/update
Field | Description |
display_language | Optional - Set user's preferred language. |
default_coin_pair | Optional - Set user's preferred coin pair. |
curl -v -X PUT https://yourdomain.com/api/user/preference/update \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "display_language": "en", "default_coin_pair": "BTC_USD" }'
{ "success": true, "message": "Preference has been updated successfully." }
{ "success": false, "message": "Failed to update preference." }
Sends request to submit KYC verification document(S). Required POST method with Bearer/Access-Token in HEADER request and form data are "id_type", "id_card_front" and "id_card_back" (optional if id type is passport). If successful, the method will return success message.
KYC Verification Endpoint: https://yourdomain.com/api/user/kyc-verifications
Field | Description |
id_type | Required - Set ID verification type one of the following - "national_id", "driving_license", "passport". |
id_card_front | Required - Set ID's front image. |
id_card_back | Optional if the id type is passport - Set ID's back image. |
curl -v -X POST https://yourdomain.com/api/user/kyc-verifications \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "id_type": "national_id", "id_card_front": "image...", "id_card_back": "image...", }'
{ "success": true, "message": "ID has been uploaded successfully." }
{ "success": false, "message": "Failed to upload ID." }
Sends request to get user's tickets . Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return tickets detail.
Get Tickets Endpoint: https://yourdomain.com/api/user/tickets
curl -v -X GET https://yourdomain.com/api/user/tickets \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
{ "success": true, "data": { "tickets": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/tickets?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/tickets?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/tickets?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/tickets", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }
Sends request to get user's single ticket detail. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return single ticket detail.
Get Ticket Detail Endpoint: https://yourdomain.com/api/user/tickets/{ticketID}/show
curl -v -X GET https://yourdomain.com/api/user/tickets/c0add1c9-bede-4224-ab5c-adcf79b0cb66/show \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
{ "success": true, "data": { "tickets": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/tickets?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/tickets?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/tickets?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/tickets", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }
Sends request to place a support ticket. Required POST method with Bearer/Access-Token in HEADER request and form data are "title", "content", "previous_id" and "attachment" . If successful, the method will return single ticket detail.
Field | Description |
title | Required - Set ticket title. |
previous_id | Optional - Set ticket previous reference ID. |
attachment | Optional - Set ticket previous attachment image. |
Submit a Ticket Endpoint: https://yourdomain.com/api/user/tickets
curl -v -X POST https://yourdomain.com/api/user/tickets \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "title": "Ticket Title Goes Here.", "content": "Ticket Content", "previous_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "attachment": "files goes here..." }'
{ "success": true, "message": "Ticket has been created successfully.", "data": { "ticket": { "user_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "title": "Ticket Title Goes Here", "content": "Ticket Content Goes Here.", "id": "9e13143a-0e6c-4251-8d03-f8fc24372be1", "updated_at": "2020-11-15T05:15:57.000000Z", "created_at": "2020-11-15T05:15:57.000000Z" } } }
{ "success": false, "message": "Failed to create the ticket." }
Sends request to place a comment on support ticket. Required POST method with Bearer/Access-Token in HEADER request and the url parameter is ticket ID and the form data is "content" and "attachment" (optional). If successful, the method will return success message.
Comment on a Ticket Endpoint: https://yourdomain.com/api/user/tickets/{ticketID}/comment
Field | Description |
content | Required - Set comment for ticket. |
attachment | Optional - Upload attachment image. |
curl -v -X POST https://yourdomain.com/api/user/tickets/c0add1c9-bede-4224-ab5c-adcf79b0cb66/comment \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token \ -d '{ "content": "Comment content goes here..", "attachment": "image file goes here..", }'
{ "success": true, "message": "The message has been created successfully." }
{ "success": false, "message": "Failed to place the comment." }
Sends request to close a support ticket. Required PUT method with Bearer/Access-Token in HEADER request and url parameter is ticket ID. If successful, the method will return success message.
Close a Ticket Endpoint: https://yourdomain.com/api/user/tickets/{ticketID}/close
curl -v -X PUT https://yourdomain.com/api/user/tickets/c0add1c9-bede-4224-ab5c-adcf79b0cb66/close \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
{ "success": true, "message": "The ticket has been closed successfully." }
{ "success": false, "message": "The relevant data is not found." }
Sends request to download a comment attachment for a support ticket. Required GET method with Bearer/Access-Token in HEADER request and url parameter is ticket ID and fileName. If successful, the method will return attachment file.
Download Comment attachment Endpoint: https://yourdomain.com/api/user/tickets/{ticketID}/download-attachment/{fileName}
curl -v -X GET https://yourdomain.com/api/user/tickets/c0add1c9-bede-4224-ab5c-adcf79b0cb66/download-attachment/c0add1c9-bede-4224-ab5c-adcf79b0cb66 \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
Sends request to get wallets detail of user. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return wallets detail.
Get Wallets Endpoint: https://yourdomain.com/api/user/wallets
curl -v -X GET https://yourdomain.com/api/user/wallets \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
{ "success": true, "data": { "current_page": 1, "data": [ { "id": "8ac8dbee-666f-42bf-bb56-d4ff9276434d", "user_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "symbol": "BTC", "primary_balance": "0.00000000", "address": null, "passphrase": null, "is_system_wallet": false, "is_active": true, "created_at": "2020-11-15T10:35:46.000000Z", "updated_at": "2020-11-15T10:35:46.000000Z", "on_order_balance": null, "coin": { "symbol": "BTC", "name": "Bitcoin", "icon": null } }, { "id": "15111092-39bb-49f8-944a-6284bf104dc8", "user_id": "c0add1c9-bede-4224-ab5c-adcf79b0cb66", "symbol": "USD", "primary_balance": "0.00000000", "address": null, "passphrase": null, "is_system_wallet": false, "is_active": true, "created_at": "2020-11-15T10:35:46.000000Z", "updated_at": "2020-11-15T10:35:46.000000Z", "on_order_balance": null, "coin": { "symbol": "USD", "name": "United States Dollar", "icon": null } } ], "first_page_url": "http://hnc-revolution.local/api/user/wallets?page=1", "from": 1, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/wallets?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/wallets?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/wallets", "per_page": 15, "prev_page_url": null, "to": 2, "total": 2 } }
{ "message": "Unauthenticated." }
Sends request to get user's deposit list. Required GET method with Bearer/Access-Token in HEADER request and the url parameter is currencySymbol. If successful, the method will return deposit list.
Get Deposit List Endpoint: https://yourdomain.com/api/user/wallets/{currencySymbol}/deposits
curl -v -X GET https://yourdomain.com/api/user/wallets/BTC/deposits \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token
{ "success": true, "data": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/wallets/USD/deposits?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/wallets/USD/deposits?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/wallets/USD/deposits?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/wallets/USD/deposits", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } }
{ "message": "Unauthenticated." }
Gets System’s Available Payment Methods for a given currency. Required GET method and url parameter is currency symbol . If successful, the method will return a success message and a list of available payment methods and bank information with 200 HTTP status.
Get System's Available Payment Methods Endpoint: https://yourdomain.com/api/coins/{currencySymbol}/payment-methods
curl -v -X GET https://yourdomain.com/api/coins/USD/payment-methods \ -H "Content-Type: application/json"
{ "success": true, "data": { "availablePaymentMethods": { "BankApi": "Bank" }, "selectedSystemBanks": [ { "id": "e062682a-6d4f-4809-bad3-0327fc09cc0b", "country": "Yemen", "bankName": "Graham and Sons", "iban": "SE2508297029259183706664", "swift": "BYNLEP58", "referenceNumber": "953987", "accountHolder": "Robbie Kunde V", "bankAddress": "226 Hildegard Gardens Suite 687\nGladysside, WI 89356-4682", "accountHolderAddress": "578 Tomasa Radial\nLake Gay, KS 22988", "isActive": 1 } ] } }
{ "success": false, "message": "The relevant data is not found." }
Gets user’s bank accounts. Required GET method. If successful, the method will return a success message and a list of user’s bank account information with 200 HTTP status.
Get System's Available Payment Methods Endpoint: https://yourdomain.com/api/user/bank-accounts
curl -v -X GET https://yourdomain.com/api/user/bank-accounts \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": [ { "id": "37d0e460-9813-4fc8-8e6c-7658e5dbd1ba", "name": "Pagac and Sons", "iban": "Pagac and Sons", "swift": "QOQLZUKP5JT", "bankAddress": "4463 Jones Burgs\nPort Lonniefort, OH 75119-9136", "referenceNumber": "49093775212", "accountHolderAddress": "64284 Annabel Course\nSouth Joan, MT 89057-3689", "isVerified": "Verified", "isActive": "Active", "createdAt": "2020-10-27T09:26:30.000000Z" }, { "id": "9a751cd5-a0a4-407c-aa0b-8dbe9b19ebce", "name": "Haag Inc", "iban": "Haag Inc", "swift": "JKGRTU67TMA", "bankAddress": "1040 Joshua Springs\nWest Kiaraview, NJ 26021-2701", "referenceNumber": "7192044944693", "accountHolderAddress": "88515 Janie Fork\nWest Brenden, NM 46622", "isVerified": "Verified", "isActive": "Active", "createdAt": "2020-10-27T09:26:30.000000Z" } ] }
{ "message": "Unauthenticated." }
Deposits fiat currency for given wallet. Required POST method and parameters are “amount”, “api”, “bank_account_id” (If api/payment method is bank), deposit_policy. If successful, the method will return a success message with 200 HTTP status comprising deposit details, user bank detail and system bank detail for user to send the amount to that system bank.
Field | Description |
amount | Required - The amount user wants to deposit |
api | Required - The available payment methods for the given currency. To get available payment methods see Get System's Available Payment Methods API |
bank_account_id | Required if api/payment method is BANK - The user bank account id by which he/she want to deposit. To get user bank account’s id see Get user's Bank Accounts API |
deposit_policy | Required - Accepted value is 1 |
Deposit Fiat Currency Endpoint: https://yourdomain.com/api/user/wallets/{currencySymbol}/deposits/store
curl -v -X POST https://yourdomain.com/api/user/wallets/USD/deposits/store \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "amount": "200.00000000", "api": "BankApi", "bank_account_id": "724200fa-47f2-4e66-b02f-49a2d0f5db47", "deposit_policy": 1 }'
{ "success": true, "message": "Deposit has been created successfully.", "data": { "depositDetails": { "id": "a591a65c-6332-49a1-ae53-e5297726a0ff", "user": "Brett Jacobson", "wallet": "United States Dollar (USD)", "amount": "200", "bank": "Pagac and Sons", "txnId": null, "status": "pending" }, "userBankDetail": { "id": "37d0e460-9813-4fc8-8e6c-7658e5dbd1ba", "bankName": "Pagac and Sons", "bankAddress": "4463 Jones Burgs\nPort Lonniefort, OH 75119-9136", "accountHolder": "Prof. Axel Ebert", "referenceNumber": "49093775212", "swift": "QOQLZUKP5JT", "iban": "LV55ZSQZZ682H91BID460", "country": "Sao Tome and Principe", "isActive": "Active", "isVerified": "Verified" }, "depositWithBanks": [ { "id": "e062682a-6d4f-4809-bad3-0327fc09cc0b", "country": "Yemen", "bankName": "Graham and Sons", "iban": "SE2508297029259183706664", "swift": "BYNLEP58", "referenceNumber": "953987", "accountHolder": "Robbie Kunde V", "bankAddress": "226 Hildegard Gardens Suite 687\nGladysside, WI 89356-4682", "accountHolderAddress": "578 Tomasa Radial\nLake Gay, KS 22988", "isActive": "Active" } ] } }
{ "success": false, "message": "Invalid fiat deposit request." }
Uploads user bank deposit receipt in system bank. Required POST method and URL parameters are currency symbol and deposit id and request form data are “system_bank_id”, “receipt” (image file). If successful, the method will return a success message with 200 HTTP status.
Upload Fiat Deposit Receipt Endpoint: https://yourdomain.com/api/user/wallets/{currencySymbol}/deposits/{depositID}/upload-bank-receipt
curl -v -X POST https://yourdomain.com/api/user/wallets/USD/deposits/824200fa-47f2-4e66-b02f-49a2d0f5db47/upload-bank-receipt \ -H "Content-Type: multipart/form-data" \ -H "Authorization: Bearer Access-Token" \ -F "system_bank_id=824200fa-47f2-4e66-b02f-49a2d0f5db47" \ -F "receipt=@/home/user1/Desktop/receipt.jpg"
{ "success": true, "message": "Receipt has been uploaded successfully." }
{ "success": false, "message": "Failed to upload receipt." }
Gets wallet deposit address for cryptocurrency or crypto wallet. Required GET method and url parameter is cryptocurrency symbol. If successful, the method will return a wallet address and qrcode with 200 HTTP status.
Get Crypto Wallet Deposit Address Endpoint: https://yourdomain.com/api/user/wallets/{currencySymbol}/get-deposit-address
curl -v -X GET https://yourdomain.com/api/user/wallets/BTC/get-deposit-address \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "walletAddress": "0x7d0e46098134fc88e6c7658e5dbd1ba", "qrCode": ... } }
{ "success": false, "message": "Network Error! Unable to generate address." }
Gets all order list of the user. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return a order list with 200 HTTP status.
Get Order Endpoint: https://yourdomain.com/api/user/orders
curl -v -X GET https://yourdomain.com/api/user/orders \-H "Content-Type: application/json" \-H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "all_orders": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/orders?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/orders?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/orders?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/orders", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }
Get all open orders for a given coinPair or market. Required GET method and Required URL parameter is currency symbol. If successful, the method will return open order list with 200 HTTP.
Get Order Endpoint: https://yourdomain.com/api/user/orders/{coinPair}/open
curl -v -X GET https://yourdomain.com/api/user/orders/BTC_USD/open \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "open_orders": [] } }
{ "message": "Unauthenticated." }
Places a buy or sell order for a category (Limit, Stop Limit, Market) in a given market. Required POST method and the parameters are “order_type”, “category”, “trade_pair”, “price”, “amount”, “total” and “stop”. If successful, the method will return the order number
phField | Description |
order_type | Required - Available order types are buy, sell. |
category | Required - Available categories are limit, stop_limt, market. |
trade_pair | Required - A pair like BTC_USD |
price | Required if order category is not market - Numeric between 0.000000001, 99999999999.99999999 |
amount | Required if order category is not market and order type is not sell - Numeric between 0.000000001, 99999999999.99999999 |
total | Required if order category is not market and order type is not sell - Numeric between 0.000000001, 99999999999.99999999 |
stop | Required if order category is stop_limit - Numerice between 0.000000001, 99999999999.99999999 |
Place Order Endpoint: https://yourdomain.com/api/user/orders/place
curl -v -X POST https://yourdomain.com/api/user/orders/place \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "order_type": "sell", "category": "limit", "trade_pair": "BTC_USD", "price": "7500.00000000", "amount": "0.5", "total": "3750.00000000", }'
{ "success": true, "message": "Your order has been placed successfully.", "data": { "order_id": "624200fa-47f2-4e66-b02f-49a2d0f5db47", "order_type": "sell", "price": "7500.00000000", "amount": "0.50000000", "total": "3750.00000000", "open_amount": "0.50000000", "exchanged": "0", "stop_limit": null, "date": "2020-05-21 22:00:00", "category": "limit" } }
curl -v -X POST https://yourdomain.com/api/user/orders/place \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "order_type": "buy", "category": "market", "trade_pair": "BTC_USD", "amount": "0.5" }'
{ "success": true, "message": "Your order has been placed successfully.", "data": { "order_id": "624200fa-47f2-4e66-b02f-49a2d0f5db47", "order_type": "buy", "price": "0", "amount": "0.50000000", "total": "0", "open_amount": "0.50000000", "exchanged": "0", "stop_limit": null, "date": "2020-05-21 22:00:00", "category": "market" } }
curl -v -X POST https://yourdomain.com/api/user/orders/place \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "order_type": "buy", "category": "stop_limit", "trade_pair": "BTC_USD", "price": "7500.00000000", "amount": "0.5", "total": "3750.00000000", "stop": "7600.00000000" }'
{ "success": true, "message": "Your order has been placed successfully.", "data": { "order_id": "624200fa-47f2-4e66-b02f-49a2d0f5db47", "order_type": "buy", "price": "7500.00000000", "amount": "0.50000000", "total": "3750.00000000", "open_amount": "0.50000000", "exchanged": "0", "stop_limit": "7600.00000000", "date": "2020-05-21 22:00:00", "category": "stop_limit" } }
{ "message": "Unauthenticated." }
Places an order cancel (both buy and sell) request for a any category (Limit, Stop Limit, Market) in a given market. Required DELETE method and the required URL parameter is the order ID. If successful, the method will return a success message with 200 HTTP status.
Cancel Order Endpoint: https://yourdomain.com/api/user/orders/{orderID}/destroy
curl -v -X DELETE https://yourdomain.com/api/user/orders/624200fa-47f2-4e66-b02f-49a2d0f5db47/destroy \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "message": "The order cancellation request has been placed successfully." }
{ "success": false, "message": "The order cancellation request has been placed successfully." }
Sends request to get trade history. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return trade history.
Get Trade History Endpoint: https://yourdomain.com/api/user/trade-history
curl -v -X GET https://yourdomain.com/api/user/trade-history \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "trade_history": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/trade-history?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/trade-history?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/trade-history?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/trade-history", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }
Sends request to get withdrawal list for given wallet / currency. Required GET method and Required URL parameter is currency symbol. If successful, the method will return a list of withdrawals message with 200 HTTP.
Get Withdrawal List Endpoint: https://yourdomain.com/api/user/wallets/{currencySymbol}/withdrawals
curl -v -X GET https://yourdomain.com/api/user/wallets/USD/withdrawals \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "current_page": 1, "data": [ { "id": "086aa961-41aa-403e-a2de-5c5b9f78115e", "user_id": "658532d7-3aa2-4e3c-bb30-4d2b60a61440", "wallet_id": "ec048965-2206-4680-9b11-8aaba17ca9fc", "bank_account_id": "37d0e460-9813-4fc8-8e6c-7658e5dbd1ba", "symbol": "USD", "address": null, "amount": "1443.49232849", "system_fee": "28.86984656", "txn_id": "5d04d0ae-5f31-4d9e-b3a6-15499d72cfa8", "api": "BankApi", "status": "completed", "created_at": "2020-10-13T17:44:01.000000Z", "updated_at": "2020-10-04T00:01:52.000000Z", "bank_account": { "id": "37d0e460-9813-4fc8-8e6c-7658e5dbd1ba", "user_id": "658532d7-3aa2-4e3c-bb30-4d2b60a61440", "country_id": 190, "bank_name": "Pagac and Sons", "iban": "LV55ZSQZZ682H91BID460", "swift": "QOQLZUKP5JT", "reference_number": "49093775212", "account_holder": "Prof. Axel Ebert", "bank_address": "4463 Jones Burgs\nPort Lonniefort, OH 75119-9136", "account_holder_address": "64284 Annabel Course\nSouth Joan, MT 89057-3689", "is_verified": 1, "is_active": 1, "created_at": "2020-10-27T09:26:30.000000Z", "updated_at": "2020-10-27T09:26:30.000000Z" } }, ... ], "first_page_url": "http://hnc-revolution.local/api/user/wallets/USD/withdrawals?page=1", "from": 1, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/wallets/USD/withdrawals?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/wallets/USD/withdrawals?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/wallets/USD/withdrawals", "per_page": 15, "prev_page_url": null, "to": 4, "total": 4 } }
{ "message": "Unauthenticated." }
Places withdraw request for given wallet / currency. Required POST method and Required URL parameter is currency symbol and request form data are “amount”, “withdrawal_policy”, “address” (required if the currency is crypto), “api” (required if the currency is fiat), “bank_account_id” (user bank account id is required if the api value is Bank) . If successful, the method will return a success message with 200 HTTP.
Field | Description |
amount | Required - The amount user wants to withdraw/td> |
withdrawal_policy | Required - Accepted value is 1 |
address | Required if currency is crypto - Relevant crypto wallet address which receive the withdrawal amount |
api | Required if the currency is fiat - The available payment methods for the given currency. To get available payment methods see Get System's Available Payment Methods API |
Withdrawal Request for Crypto Wallet Endpoint: https://yourdomain.com/api/user/wallets/{CurrencySymbol}/withdrawals
curl -v -X POST https://yourdomain.com/api/user/wallets/BTC/withdrawals/store \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "amount": "0.50000000", "withdrawal_policy": 1, "address": "0x24200fa47f24e66b02f49a2d0f5db47" }'
curl -v -X POST https://yourdomain.com/api/user/wallets/USD/withdrawals/store \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token" \ -d '{ "amount": "0.50000000", "withdrawal_policy": 1, "api": "BankApi", "bank_account_id": "724200fa-47f2-4e66-b02f-49a2d0f5db47" }'
{ "success": true, "message": "Your withdrawal has been placed successfully." }
{ "success": false, "message": "Unable to withdraw amount." }
Places a bank withdrawal cancel request for fiat currencies. Required DELETE method and the required url parameter is the currency symbol and withdrawal ID. If successful, the method will return a success message with 200 HTTP status.
Withdrawal Request for Crypto Wallet Endpoint: https://yourdomain.com/api/user/wallets/{CurrencySymbol}/withdrawals/destroy
curl -v -X DELETE https://yourdomain.com/api/user/wallets/USD/withdrawals/624200fa-47f2-4e66-b02f-49a2d0f5db47/destroy \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "message": "The withdrawal cancellation will be processed shortly." }
{ "success": false, "message": "Failed to cancel the withdrawal." }
Sends request to get referral link. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return a referral link.
Get Referral Link Endpoint: https://yourdomain.com/api/user/referral/get-link
curl -v -X GET https://yourdomain.com/api/user/referral/get-link \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "referral_link": "http://hnc-revolution.local/register?ref=fcdd3595-6ebe-4668-a65b-6444344eae1a" } }
{ "message": "Unauthenticated." }
Sends request to get referral earnings. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return referral earnings.
Get Referral Earnings Endpoint: https://yourdomain.com/api/user/referral/earnings
curl -v -X GET https://yourdomain.com/api/user/referral/earnings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "referral_earnings": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/referral/earnings?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/referral/earnings?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/referral/earnings?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/referral/earnings", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }
Sends request to get referral users. Required GET method with Bearer/Access-Token in HEADER request. If successful, the method will return referral users list.
Get Referral Users Endpoint: https://yourdomain.com/api/user/referral/users
curl -v -X GET https://yourdomain.com/api/user/referral/users \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "referral_users": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/referral/users?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/referral/users?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/referral/users?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/referral/users", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }
Sends request to get referral earnings through user. Required GET method with Bearer/Access-Token in HEADER request and url parameter is user id. If successful, the method will return earnings through that user.
Get Referral Users Endpoint: https://yourdomain.com/api/user/referral/users/{userID}/earnings
curl -v -X GET https://yourdomain.com/api/user/referral/users/{userID}/earnings \ -H "Content-Type: application/json" \ -H "Authorization: Bearer Access-Token"
{ "success": true, "data": { "earns_through_user": { "current_page": 1, "data": [], "first_page_url": "http://hnc-revolution.local/api/user/referral/users/c0add1c9-bede-4224-ab5c-adcf79b0cb66/earnings?page=1", "from": null, "last_page": 1, "last_page_url": "http://hnc-revolution.local/api/user/referral/users/c0add1c9-bede-4224-ab5c-adcf79b0cb66/earnings?page=1", "links": [ { "url": null, "label": "« Previous", "active": false }, { "url": "http://hnc-revolution.local/api/user/referral/users/c0add1c9-bede-4224-ab5c-adcf79b0cb66/earnings?page=1", "label": 1, "active": true }, { "url": null, "label": "Next »", "active": false } ], "next_page_url": null, "path": "http://hnc-revolution.local/api/user/referral/users/c0add1c9-bede-4224-ab5c-adcf79b0cb66/earnings", "per_page": 15, "prev_page_url": null, "to": null, "total": 0 } } }
{ "message": "Unauthenticated." }