What is DART API?

Dart api provided the ability to external system to connect with the Dart.By using api, user can create and manage the dart's users externally.In here bearer token use to identify the api users.

logo

API Url: https://api.dart.cash/api

Authentication

As below after create API token using for authenticate with the API, simply append the bearer token GET parameter to the API's base URL:

                                
1$request->setHeader(array(
2 'Authorization' => 'Bearer <token>'
3));

Get external customer

In order to get customer details an HTTP GET request containing a series of parameters and objects to the API's customer/get endpoint is required. All parameters and objects are specified below:

Name Description
dart_user_name This parameter is used in order to specify a customer user name.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/get?dart_user_name=billyjoel');
3$request->setMethod(HTTP_Request2::METHOD_GET);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));

API Response

1{
2 "first_name": "Billy",
3 "last_name": "Joel",
4 "dart_user_name": "billyjoel",
5 "email": "billy@gmail.com"
6}

Create external customer

In order to create external customer an HTTP POST request containing a series of parameters and objects to the API's customer/create endpoint is required. All parameters and objects are specified below:

Name Description
first_name This parameter is used in order to specify a customer first name.
last_name This parameter is used in order to specify a customer last name.
user_name This parameter is used in order to specify a customer user name.
email This parameter is used in order to specify a customer email.
password This parameter is used in order to specify a customer password.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/create');
3$request->setMethod(HTTP_Request2::METHOD_POST);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));
11$request->addPostParameter(array(
12 'first_name' => 'Billy ',
13 'last_name' => 'Joel',
14 'user_name' => 'billyjoel',
15 'email' => 'billy@gmail.com',
16 'password' => 'billy@123#'
17));

API Response

1"Customer Created Successfully."

Edit external customer

In order to edit external customer an HTTP POST request containing a series of parameters and objects to the API's customer/update endpoint is required. All parameters and objects are specified below:

Name Description
dart_user_name This parameter is used in order to specify a customer user name.
first_name This parameter is used in order to specify a customer first name.
last_name This parameter is used in order to specify a customer last name.
email This parameter is used in order to specify a customer email.
password This parameter is used in order to specify a customer password.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/update');
3$request->setMethod(HTTP_Request2::METHOD_POST);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));
11$request->addPostParameter(array(
12 'dart_user_name' => 'billyjoel',
13 'first_name' => 'Billy',
14 'last_name' => 'Joel',
15 'email' => 'billy@gmail.com',
16 'password' => 'billy@123'
17));

API Response

1"Customer Updated Successfully."

Restriction for trade scripts

In order to restrict for trade scripts an HTTP POST request containing a series of parameters and objects to the API's customer/update-tsp-status endpoint is required. All parameters and objects are specified below:

Name Description
dart_user_name This parameter is used in order to specify a customer user name.
external_tsp_status Set to false in order to restrict for trade scripts.
tsp_duration Set an integer as number of hours to deactivate trade scripts.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/update-tsp-status');
3$request->setMethod(HTTP_Request2::METHOD_POST);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));
11$request->addPostParameter(array(
12 'dart_user_name' => 'billyjoel',
13 'external_tsp_status' => 'false',
14 'tsp_duration' => '10',
15));

API Response

1"Customer Tsp Access Disabled"

Customer trade script details

In order to get customer trade script details an HTTP GET request containing a series of parameters and objects to the API's customer/trade-script-details endpoint is required. All parameters and objects are specified below:

Name Description
dart_user_name This parameter is used in order to specify a customer user name.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/trade-script-details?dart_user_name=billyjoel');
3$request->setMethod(HTTP_Request2::METHOD_GET);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));

API Response

1{
2"data": [
3{
4"trade_script_name": "Full Velocity Members Only",
5"initial_amount": "49.25",
6"current_amount": "49.2500",
7"status": 5,
8"total_deposit": "50.0000",
9"activate_date": "2022-06-08"
10}
11]
12}

Customer total balance of USDC

In order to get customer total balance of USDC an HTTP GET request containing a series of parameters and objects to the API's customer/usdc-balance endpoint is required. All parameters and objects are specified below:

Name Description
dart_user_name This parameter is used in order to specify a customer user name.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/usdc-balance?dart_user_name=billyjoel');
3$request->setMethod(HTTP_Request2::METHOD_GET);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));

API Response

1{
2 "total_usdc_balance":"980.04"
3}

Customer custom token value

In order to get customer custom token value an HTTP GET request containing a series of parameters and objects to the API's customer/token-value endpoint is required. All parameters and objects are specified below:

Name Description
dart_user_name This parameter is used in order to specify a customer user name.
token This parameter is used in order to specify a token name.

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/token-value?dart_user_name=billyjoel&token=Chaos');
3$request->setMethod(HTTP_Request2::METHOD_GET);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));

API Response

1{
2 "token_value":"19.96"
3}

Transfer An Amount to Customer Main Wallet

In order to transfer an amount to a customer's main wallet. post an HTTP POST request containing a series of parameters and objects to the API's customer/transfer-amount endpoint is required. All parameters and objects are specified below:

API Request

1$request = new HTTP_Request2();
2$request->setUrl('https://api.dart.cash/api/customer/transfer-amount');
3$request->setMethod(HTTP_Request2::METHOD_POST);
4$request->setConfig(array(
5 'follow_redirects' => TRUE
6));
7$request->setHeader(array(
8 'Accept' => 'application/json',
9 'Authorization' => 'Bearer 2|BtyCiKlUQ8wSDlhCAXYVMljlFudQKb5AqWhLOmTT'
10));
Name Description
userId This parameter is used in order to specify a customer user name.
amount This parameter is used in order to specify an amount.

API Request

1{
2 "userId" : "customer user name.",
3 "amount" : "the amount api user wants to transfer to customer",
4}

Webhook

Customer activate

After activating your customer from the Dart system you will receive a Webhook HTTP POST response from this your-domain/webhook/customer-activate endpoint.

Webhook Response

1{
2 "message" : "External customer activated.",
3 "old_dart_user_name" : "billyjoel",
4 "new_dart_user_name" : "billyjoel"
5}

Customer update

After updating your customer details from the Dart system you will receive a Webhook HTTP POST response from this your-domain/webhook/customer-update endpoint.

Webhook Response

1{
2 "message" : "External customer information updated",
3 "old_dart_user_name" : "billyjoel",
4 "new_dart_user_name" : "billy"
5}

Customer deactivate

After deactivating your customer from the Dart system you will receive a Webhook HTTP POST response from this your-domain/webhook/customer-deactivate endpoint.

Webhook Response

1{
2 "message" : "External customer deactivated."
3 "old_dart_user_name" : "billyjoel",
4 "new_dart_user_name" : "billyjoel"
5}

Trade script withdrawal/exit

After customer withdrawal or exit from the Dart system trade script you will receive a Webhook HTTP POST response from this your-domain/webhook/trade-script-withdrawal endpoint.

If customer withdrawal from trade script

Webhook Response

1{
2 "message" : "External customer exit from trade script."
3 "old_dart_user_name" : "billyjoel",
4 "new_dart_user_name" : "billyjoel",
5 "amount" => "2.00",
6 "trade_script_name" => "Full Velocity Members Only"
7}

If customer exit from trade script

Webhook Response

1{
2 "message" : "External customer withdraw from trade script."
3 "old_dart_user_name" : "billyjoel",
4 "new_dart_user_name" : "billyjoel",
5 "amount" => "50.00",
6 "trade_script_name" => "Full Velocity Members Only"
7}