HTTP API

Account

getAccount

Get an account.

Gets account metadata for an address. **Destination:** Witness node. **Rate Limit:** 5 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m](https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/account/tbnb185tqzq3j6y7yep85lncaz9qeectjxqe5054cgn](https://testnet-dex.binance.org/api/v1/account/tbnb185tqzq3j6y7yep85lncaz9qeectjxqe5054cgn)


/api/v1/account/{address}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/account/{address}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountApi;

import java.io.File;
import java.util.*;

public class AccountApiExample {

    public static void main(String[] args) {
        
        AccountApi apiInstance = new AccountApi();
        String address = address_example; // String | The account address to query
        try {
            Account result = apiInstance.getAccount(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#getAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountApi;

public class AccountApiExample {

    public static void main(String[] args) {
        AccountApi apiInstance = new AccountApi();
        String address = address_example; // String | The account address to query
        try {
            Account result = apiInstance.getAccount(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#getAccount");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // The account address to query

AccountApi *apiInstance = [[AccountApi alloc] init];

// Get an account.
[apiInstance getAccountWith:address
              completionHandler: ^(Account output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.AccountApi()
var address = address_example; // {{String}} The account address to query

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccount(address, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAccountExample
    {
        public void main()
        {

            var apiInstance = new AccountApi();
            var address = address_example;  // String | The account address to query

            try
            {
                // Get an account.
                Account result = apiInstance.getAccount(address);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountApi.getAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAccountApi();
$address = address_example; // String | The account address to query

try {
    $result = $api_instance->getAccount($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountApi;

my $api_instance = WWW::SwaggerClient::AccountApi->new();
my $address = address_example; # String | The account address to query

eval { 
    my $result = $api_instance->getAccount(address => $address);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountApi->getAccount: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AccountApi()
address = address_example # String | The account address to query

try: 
    # Get an account.
    api_response = api_instance.get_account(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->getAccount: %s\n" % e)

Parameters

Path parameters
Name Description
address*
String
The account address to query
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getAccountSequence

Get an account sequence.

Gets an account sequence for an address. **Destination:** Validator node. **Rate Limit:** 5 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m/sequence](https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m/sequence) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/account/tbnb13g2le062t340klgm2l2khzr57y3qxlekuhfuch/sequence](https://testnet-dex.binance.org/api/v1/account/tbnb13g2le062t340klgm2l2khzr57y3qxlekuhfuch/sequence)


/api/v1/account/{address}/sequence

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/account/{address}/sequence"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountApi;

import java.io.File;
import java.util.*;

public class AccountApiExample {

    public static void main(String[] args) {
        
        AccountApi apiInstance = new AccountApi();
        String address = address_example; // String | The account address to query
        try {
            AccountSequence result = apiInstance.getAccountSequence(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#getAccountSequence");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountApi;

public class AccountApiExample {

    public static void main(String[] args) {
        AccountApi apiInstance = new AccountApi();
        String address = address_example; // String | The account address to query
        try {
            AccountSequence result = apiInstance.getAccountSequence(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#getAccountSequence");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // The account address to query

AccountApi *apiInstance = [[AccountApi alloc] init];

// Get an account sequence.
[apiInstance getAccountSequenceWith:address
              completionHandler: ^(AccountSequence output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.AccountApi()
var address = address_example; // {{String}} The account address to query

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccountSequence(address, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAccountSequenceExample
    {
        public void main()
        {

            var apiInstance = new AccountApi();
            var address = address_example;  // String | The account address to query

            try
            {
                // Get an account sequence.
                AccountSequence result = apiInstance.getAccountSequence(address);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountApi.getAccountSequence: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAccountApi();
$address = address_example; // String | The account address to query

try {
    $result = $api_instance->getAccountSequence($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getAccountSequence: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountApi;

my $api_instance = WWW::SwaggerClient::AccountApi->new();
my $address = address_example; # String | The account address to query

eval { 
    my $result = $api_instance->getAccountSequence(address => $address);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountApi->getAccountSequence: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AccountApi()
address = address_example # String | The account address to query

try: 
    # Get an account sequence.
    api_response = api_instance.get_account_sequence(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->getAccountSequence: %s\n" % e)

Parameters

Path parameters
Name Description
address*
String
The account address to query
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getTimeLocks

Gets time lock records given an address


/api/v1/timelocks/{address}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/timelocks/{address}?id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AccountApi;

import java.io.File;
import java.util.*;

public class AccountApiExample {

    public static void main(String[] args) {
        
        AccountApi apiInstance = new AccountApi();
        String address = address_example; // String | The account address to query
        Long id = 789; // Long | the record id of timelock to query
        try {
            TimeLocks result = apiInstance.getTimeLocks(address, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#getTimeLocks");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AccountApi;

public class AccountApiExample {

    public static void main(String[] args) {
        AccountApi apiInstance = new AccountApi();
        String address = address_example; // String | The account address to query
        Long id = 789; // Long | the record id of timelock to query
        try {
            TimeLocks result = apiInstance.getTimeLocks(address, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AccountApi#getTimeLocks");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // The account address to query
Long *id = 789; // the record id of timelock to query (optional)

AccountApi *apiInstance = [[AccountApi alloc] init];

// Gets time lock records given an address
[apiInstance getTimeLocksWith:address
    id:id
              completionHandler: ^(TimeLocks output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.AccountApi()
var address = address_example; // {{String}} The account address to query
var opts = { 
  'id': 789 // {{Long}} the record id of timelock to query
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTimeLocks(address, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTimeLocksExample
    {
        public void main()
        {

            var apiInstance = new AccountApi();
            var address = address_example;  // String | The account address to query
            var id = 789;  // Long | the record id of timelock to query (optional) 

            try
            {
                // Gets time lock records given an address
                TimeLocks result = apiInstance.getTimeLocks(address, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AccountApi.getTimeLocks: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAccountApi();
$address = address_example; // String | The account address to query
$id = 789; // Long | the record id of timelock to query

try {
    $result = $api_instance->getTimeLocks($address, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AccountApi->getTimeLocks: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AccountApi;

my $api_instance = WWW::SwaggerClient::AccountApi->new();
my $address = address_example; # String | The account address to query
my $id = 789; # Long | the record id of timelock to query

eval { 
    my $result = $api_instance->getTimeLocks(address => $address, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AccountApi->getTimeLocks: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AccountApi()
address = address_example # String | The account address to query
id = 789 # Long | the record id of timelock to query (optional)

try: 
    # Gets time lock records given an address
    api_response = api_instance.get_time_locks(address, id=id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountApi->getTimeLocks: %s\n" % e)

Parameters

Path parameters
Name Description
address*
String
The account address to query
Required
Query parameters
Name Description
id
Long (int64)
the record id of timelock to query

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 500 - internal server error


AtomicSwap

getAtomicSwapUsingGET

AtomicSwap

Get an AtomicSwap by swap id **Rate Limit:** 5 request per IP per second. **Rate Limit:** 60 request per IP per minute.


/api/v1/atomic-swaps/{id}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/atomic-swaps/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AtomicSwapApi;

import java.io.File;
import java.util.*;

public class AtomicSwapApiExample {

    public static void main(String[] args) {
        
        AtomicSwapApi apiInstance = new AtomicSwapApi();
        String id = id_example; // String | swap id
        try {
            AtomicSwap result = apiInstance.getAtomicSwapUsingGET(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AtomicSwapApi#getAtomicSwapUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AtomicSwapApi;

public class AtomicSwapApiExample {

    public static void main(String[] args) {
        AtomicSwapApi apiInstance = new AtomicSwapApi();
        String id = id_example; // String | swap id
        try {
            AtomicSwap result = apiInstance.getAtomicSwapUsingGET(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AtomicSwapApi#getAtomicSwapUsingGET");
            e.printStackTrace();
        }
    }
}
String *id = id_example; // swap id

AtomicSwapApi *apiInstance = [[AtomicSwapApi alloc] init];

// AtomicSwap
[apiInstance getAtomicSwapUsingGETWith:id
              completionHandler: ^(AtomicSwap output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.AtomicSwapApi()
var id = id_example; // {{String}} swap id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAtomicSwapUsingGET(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAtomicSwapUsingGETExample
    {
        public void main()
        {

            var apiInstance = new AtomicSwapApi();
            var id = id_example;  // String | swap id

            try
            {
                // AtomicSwap
                AtomicSwap result = apiInstance.getAtomicSwapUsingGET(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AtomicSwapApi.getAtomicSwapUsingGET: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAtomicSwapApi();
$id = id_example; // String | swap id

try {
    $result = $api_instance->getAtomicSwapUsingGET($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AtomicSwapApi->getAtomicSwapUsingGET: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AtomicSwapApi;

my $api_instance = WWW::SwaggerClient::AtomicSwapApi->new();
my $id = id_example; # String | swap id

eval { 
    my $result = $api_instance->getAtomicSwapUsingGET(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AtomicSwapApi->getAtomicSwapUsingGET: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AtomicSwapApi()
id = id_example # String | swap id

try: 
    # AtomicSwap
    api_response = api_instance.get_atomic_swap_using_get(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AtomicSwapApi->getAtomicSwapUsingGET: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
swap id
Required

Responses

Status: 200 - OK


getAtomicSwapsByAddrUsingGET

AtomicSwap

Get atomic swaps by address. **Rate Limit:** 5 request per IP per second. **Rate Limit:** 60 requests per IP per minute.


/api/v1/atomic-swaps

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/atomic-swaps?endTime=&fromAddress=&limit=&offset=&startTime=&toAddress="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AtomicSwapApi;

import java.io.File;
import java.util.*;

public class AtomicSwapApiExample {

    public static void main(String[] args) {
        
        AtomicSwapApi apiInstance = new AtomicSwapApi();
        Long endTime = 789; // Long | end time of blockTimestamp
        String fromAddress = fromAddress_example; // String | At least one of toAddress and fromAddress should be provided as parameter
        Integer limit = 56; // Integer | default 25; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        Long startTime = 789; // Long | start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days.
        String toAddress = toAddress_example; // String | At least one of toAddress and fromAddress should be provided as parameter
        try {
            AtomicSwapPage result = apiInstance.getAtomicSwapsByAddrUsingGET(endTime, fromAddress, limit, offset, startTime, toAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AtomicSwapApi#getAtomicSwapsByAddrUsingGET");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AtomicSwapApi;

public class AtomicSwapApiExample {

    public static void main(String[] args) {
        AtomicSwapApi apiInstance = new AtomicSwapApi();
        Long endTime = 789; // Long | end time of blockTimestamp
        String fromAddress = fromAddress_example; // String | At least one of toAddress and fromAddress should be provided as parameter
        Integer limit = 56; // Integer | default 25; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        Long startTime = 789; // Long | start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days.
        String toAddress = toAddress_example; // String | At least one of toAddress and fromAddress should be provided as parameter
        try {
            AtomicSwapPage result = apiInstance.getAtomicSwapsByAddrUsingGET(endTime, fromAddress, limit, offset, startTime, toAddress);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AtomicSwapApi#getAtomicSwapsByAddrUsingGET");
            e.printStackTrace();
        }
    }
}
Long *endTime = 789; // end time of blockTimestamp (optional)
String *fromAddress = fromAddress_example; // At least one of toAddress and fromAddress should be provided as parameter (optional)
Integer *limit = 56; // default 25; max 1000. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)
Long *startTime = 789; // start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days. (optional)
String *toAddress = toAddress_example; // At least one of toAddress and fromAddress should be provided as parameter (optional)

AtomicSwapApi *apiInstance = [[AtomicSwapApi alloc] init];

// AtomicSwap
[apiInstance getAtomicSwapsByAddrUsingGETWith:endTime
    fromAddress:fromAddress
    limit:limit
    offset:offset
    startTime:startTime
    toAddress:toAddress
              completionHandler: ^(AtomicSwapPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.AtomicSwapApi()
var opts = { 
  'endTime': 789, // {{Long}} end time of blockTimestamp
  'fromAddress': fromAddress_example, // {{String}} At least one of toAddress and fromAddress should be provided as parameter
  'limit': 56, // {{Integer}} default 25; max 1000.
  'offset': 56, // {{Integer}} start with 0; default 0.
  'startTime': 789, // {{Long}} start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days.
  'toAddress': toAddress_example // {{String}} At least one of toAddress and fromAddress should be provided as parameter
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAtomicSwapsByAddrUsingGET(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAtomicSwapsByAddrUsingGETExample
    {
        public void main()
        {

            var apiInstance = new AtomicSwapApi();
            var endTime = 789;  // Long | end time of blockTimestamp (optional) 
            var fromAddress = fromAddress_example;  // String | At least one of toAddress and fromAddress should be provided as parameter (optional) 
            var limit = 56;  // Integer | default 25; max 1000. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 
            var startTime = 789;  // Long | start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days. (optional) 
            var toAddress = toAddress_example;  // String | At least one of toAddress and fromAddress should be provided as parameter (optional) 

            try
            {
                // AtomicSwap
                AtomicSwapPage result = apiInstance.getAtomicSwapsByAddrUsingGET(endTime, fromAddress, limit, offset, startTime, toAddress);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AtomicSwapApi.getAtomicSwapsByAddrUsingGET: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiAtomicSwapApi();
$endTime = 789; // Long | end time of blockTimestamp
$fromAddress = fromAddress_example; // String | At least one of toAddress and fromAddress should be provided as parameter
$limit = 56; // Integer | default 25; max 1000.
$offset = 56; // Integer | start with 0; default 0.
$startTime = 789; // Long | start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days.
$toAddress = toAddress_example; // String | At least one of toAddress and fromAddress should be provided as parameter

try {
    $result = $api_instance->getAtomicSwapsByAddrUsingGET($endTime, $fromAddress, $limit, $offset, $startTime, $toAddress);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AtomicSwapApi->getAtomicSwapsByAddrUsingGET: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AtomicSwapApi;

my $api_instance = WWW::SwaggerClient::AtomicSwapApi->new();
my $endTime = 789; # Long | end time of blockTimestamp
my $fromAddress = fromAddress_example; # String | At least one of toAddress and fromAddress should be provided as parameter
my $limit = 56; # Integer | default 25; max 1000.
my $offset = 56; # Integer | start with 0; default 0.
my $startTime = 789; # Long | start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days.
my $toAddress = toAddress_example; # String | At least one of toAddress and fromAddress should be provided as parameter

eval { 
    my $result = $api_instance->getAtomicSwapsByAddrUsingGET(endTime => $endTime, fromAddress => $fromAddress, limit => $limit, offset => $offset, startTime => $startTime, toAddress => $toAddress);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AtomicSwapApi->getAtomicSwapsByAddrUsingGET: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AtomicSwapApi()
endTime = 789 # Long | end time of blockTimestamp (optional)
fromAddress = fromAddress_example # String | At least one of toAddress and fromAddress should be provided as parameter (optional)
limit = 56 # Integer | default 25; max 1000. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)
startTime = 789 # Long | start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days. (optional)
toAddress = toAddress_example # String | At least one of toAddress and fromAddress should be provided as parameter (optional)

try: 
    # AtomicSwap
    api_response = api_instance.get_atomic_swaps_by_addr_using_get(endTime=endTime, fromAddress=fromAddress, limit=limit, offset=offset, startTime=startTime, toAddress=toAddress)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AtomicSwapApi->getAtomicSwapsByAddrUsingGET: %s\n" % e)

Parameters

Query parameters
Name Description
endTime
Long (int64)
end time of blockTimestamp
fromAddress
String
At least one of toAddress and fromAddress should be provided as parameter
limit
Integer (int32)
default 25; max 1000.
offset
Integer (int32)
start with 0; default 0.
startTime
Long (int64)
start time of blockTimestamp; The maximum start - end query window is 3 months; Default query window is the latest 30 days.
toAddress
String
At least one of toAddress and fromAddress should be provided as parameter

Responses

Status: 200 - OK


Info

getFees

Obtain trading fees information.

Gets the current trading fees settings. **Destination:** Witness node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/fees](https://dex.binance.org/api/v1/fees) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/fees](https://testnet-dex.binance.org/api/v1/fees)


/api/v1/fees

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/fees"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

import java.io.File;
import java.util.*;

public class InfoApiExample {

    public static void main(String[] args) {
        
        InfoApi apiInstance = new InfoApi();
        try {
            array[Fee] result = apiInstance.getFees();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getFees");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        try {
            array[Fee] result = apiInstance.getFees();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getFees");
            e.printStackTrace();
        }
    }
}

InfoApi *apiInstance = [[InfoApi alloc] init];

// Obtain trading fees information.
[apiInstance getFeesWithCompletionHandler: 
              ^(array[Fee] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.InfoApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFees(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFeesExample
    {
        public void main()
        {

            var apiInstance = new InfoApi();

            try
            {
                // Obtain trading fees information.
                array[Fee] result = apiInstance.getFees();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.getFees: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInfoApi();

try {
    $result = $api_instance->getFees();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->getFees: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InfoApi;

my $api_instance = WWW::SwaggerClient::InfoApi->new();

eval { 
    my $result = $api_instance->getFees();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->getFees: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InfoApi()

try: 
    # Obtain trading fees information.
    api_response = api_instance.get_fees()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->getFees: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: default - Generic error response


getNodeInfo

Get node information.

Gets runtime information about the node. Return block height, current timestamp and the number of connected peers. **Destination:** Validator node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/node-info](https://dex.binance.org/api/v1/node-info) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/node-info](https://testnet-dex.binance.org/api/v1/node-info)


/api/v1/node-info

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/node-info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

import java.io.File;
import java.util.*;

public class InfoApiExample {

    public static void main(String[] args) {
        
        InfoApi apiInstance = new InfoApi();
        try {
            ResultStatus result = apiInstance.getNodeInfo();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getNodeInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        try {
            ResultStatus result = apiInstance.getNodeInfo();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getNodeInfo");
            e.printStackTrace();
        }
    }
}

InfoApi *apiInstance = [[InfoApi alloc] init];

// Get node information.
[apiInstance getNodeInfoWithCompletionHandler: 
              ^(ResultStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.InfoApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeInfo(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeInfoExample
    {
        public void main()
        {

            var apiInstance = new InfoApi();

            try
            {
                // Get node information.
                ResultStatus result = apiInstance.getNodeInfo();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.getNodeInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInfoApi();

try {
    $result = $api_instance->getNodeInfo();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->getNodeInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InfoApi;

my $api_instance = WWW::SwaggerClient::InfoApi->new();

eval { 
    my $result = $api_instance->getNodeInfo();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->getNodeInfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InfoApi()

try: 
    # Get node information.
    api_response = api_instance.get_node_info()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->getNodeInfo: %s\n" % e)

Parameters

Responses

Status: 200 - Success


getPeers

Get network peers.

Gets the list of network peers. **Destination:** Witness node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/peers](https://dex.binance.org/api/v1/peers) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/peers](https://testnet-dex.binance.org/api/v1/peers)


/api/v1/peers

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/peers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

import java.io.File;
import java.util.*;

public class InfoApiExample {

    public static void main(String[] args) {
        
        InfoApi apiInstance = new InfoApi();
        try {
            array[Peer] result = apiInstance.getPeers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getPeers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        try {
            array[Peer] result = apiInstance.getPeers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getPeers");
            e.printStackTrace();
        }
    }
}

InfoApi *apiInstance = [[InfoApi alloc] init];

// Get network peers.
[apiInstance getPeersWithCompletionHandler: 
              ^(array[Peer] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.InfoApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPeers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPeersExample
    {
        public void main()
        {

            var apiInstance = new InfoApi();

            try
            {
                // Get network peers.
                array[Peer] result = apiInstance.getPeers();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.getPeers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInfoApi();

try {
    $result = $api_instance->getPeers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->getPeers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InfoApi;

my $api_instance = WWW::SwaggerClient::InfoApi->new();

eval { 
    my $result = $api_instance->getPeers();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->getPeers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InfoApi()

try: 
    # Get network peers.
    api_response = api_instance.get_peers()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->getPeers: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getValidators

Get validators.

Gets the list of validators used in consensus. **Destination:** Witness node. **Rate Limit:** 10 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/validators](https://dex.binance.org/api/v1/validators) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/validators](https://testnet-dex.binance.org/api/v1/validators)


/api/v1/validators

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/validators"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.InfoApi;

import java.io.File;
import java.util.*;

public class InfoApiExample {

    public static void main(String[] args) {
        
        InfoApi apiInstance = new InfoApi();
        try {
            array[Validators] result = apiInstance.getValidators();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getValidators");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.InfoApi;

public class InfoApiExample {

    public static void main(String[] args) {
        InfoApi apiInstance = new InfoApi();
        try {
            array[Validators] result = apiInstance.getValidators();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling InfoApi#getValidators");
            e.printStackTrace();
        }
    }
}

InfoApi *apiInstance = [[InfoApi alloc] init];

// Get validators.
[apiInstance getValidatorsWithCompletionHandler: 
              ^(array[Validators] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.InfoApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getValidators(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getValidatorsExample
    {
        public void main()
        {

            var apiInstance = new InfoApi();

            try
            {
                // Get validators.
                array[Validators] result = apiInstance.getValidators();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling InfoApi.getValidators: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiInfoApi();

try {
    $result = $api_instance->getValidators();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->getValidators: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::InfoApi;

my $api_instance = WWW::SwaggerClient::InfoApi->new();

eval { 
    my $result = $api_instance->getValidators();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling InfoApi->getValidators: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.InfoApi()

try: 
    # Get validators.
    api_response = api_instance.get_validators()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling InfoApi->getValidators: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


Market

get24HrPriceStatistics

Get a market ticker.

Gets 24 hour price change statistics for a market pair symbol. Updated every second. **Rate Limit:** 5 requests per IP per second.


/api/v1/ticker/24hr

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/ticker/24hr?symbol="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MarketApi;

import java.io.File;
import java.util.*;

public class MarketApiExample {

    public static void main(String[] args) {
        
        MarketApi apiInstance = new MarketApi();
        String symbol = symbol_example; // String | symbol
        try {
            array[TickerStatistics] result = apiInstance.get24HrPriceStatistics(symbol);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#get24HrPriceStatistics");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MarketApi;

public class MarketApiExample {

    public static void main(String[] args) {
        MarketApi apiInstance = new MarketApi();
        String symbol = symbol_example; // String | symbol
        try {
            array[TickerStatistics] result = apiInstance.get24HrPriceStatistics(symbol);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#get24HrPriceStatistics");
            e.printStackTrace();
        }
    }
}
String *symbol = symbol_example; // symbol (optional)

MarketApi *apiInstance = [[MarketApi alloc] init];

// Get a market ticker.
[apiInstance get24HrPriceStatisticsWith:symbol
              completionHandler: ^(array[TickerStatistics] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.MarketApi()
var opts = { 
  'symbol': symbol_example // {{String}} symbol
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.get24HrPriceStatistics(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class get24HrPriceStatisticsExample
    {
        public void main()
        {

            var apiInstance = new MarketApi();
            var symbol = symbol_example;  // String | symbol (optional) 

            try
            {
                // Get a market ticker.
                array[TickerStatistics] result = apiInstance.get24HrPriceStatistics(symbol);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MarketApi.get24HrPriceStatistics: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMarketApi();
$symbol = symbol_example; // String | symbol

try {
    $result = $api_instance->get24HrPriceStatistics($symbol);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MarketApi->get24HrPriceStatistics: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MarketApi;

my $api_instance = WWW::SwaggerClient::MarketApi->new();
my $symbol = symbol_example; # String | symbol

eval { 
    my $result = $api_instance->get24HrPriceStatistics(symbol => $symbol);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MarketApi->get24HrPriceStatistics: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MarketApi()
symbol = symbol_example # String | symbol (optional)

try: 
    # Get a market ticker.
    api_response = api_instance.get24_hr_price_statistics(symbol=symbol)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MarketApi->get24HrPriceStatistics: %s\n" % e)

Parameters

Query parameters
Name Description
symbol
String
symbol

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getCandlestickBars

Get candlestick bars.

Gets candlestick/kline bars for a symbol. Bars are uniquely identified by their open time. If the time window is larger than limits, only the first n klines will return. In this case, please either shrink the window or increase the limit to get proper amount of klines. **Rate Limit:** 10 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/klines?symbol=NNB-338_BNB&interval=5m](https://dex.binance.org/api/v1/klines?symbol=NNB-338_BNB&interval=5m) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/klines?symbol=NNB-338_BNB&interval=5m](https://testnet-dex.binance.org/api/v1/klines?symbol=NNB-338_BNB&interval=5m) **Example** ``` [ 1499040000000, // Open time "0.01634790", // Open "0.80000000", // High "0.01575800", // Low "0.01577100", // Close "148976.11427815", // Volume 1499644799999, // Close time "2434.19055334", // Quote asset volume 308 // Number of trades ] ```


/api/v1/klines

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/klines?symbol=&interval=&limit=&startTime=&endTime="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MarketApi;

import java.io.File;
import java.util.*;

public class MarketApiExample {

    public static void main(String[] args) {
        
        MarketApi apiInstance = new MarketApi();
        String symbol = symbol_example; // String | symbol
        String interval = interval_example; // String | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
        Integer limit = 56; // Integer | default 300; max 1000.
        Long startTime = 789; // Long | start time in Milliseconds
        Long endTime = 789; // Long | end time in Milliseconds
        try {
            array[Candlestick] result = apiInstance.getCandlestickBars(symbol, interval, limit, startTime, endTime);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getCandlestickBars");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MarketApi;

public class MarketApiExample {

    public static void main(String[] args) {
        MarketApi apiInstance = new MarketApi();
        String symbol = symbol_example; // String | symbol
        String interval = interval_example; // String | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
        Integer limit = 56; // Integer | default 300; max 1000.
        Long startTime = 789; // Long | start time in Milliseconds
        Long endTime = 789; // Long | end time in Milliseconds
        try {
            array[Candlestick] result = apiInstance.getCandlestickBars(symbol, interval, limit, startTime, endTime);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getCandlestickBars");
            e.printStackTrace();
        }
    }
}
String *symbol = symbol_example; // symbol
String *interval = interval_example; // interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
Integer *limit = 56; // default 300; max 1000. (optional)
Long *startTime = 789; // start time in Milliseconds (optional)
Long *endTime = 789; // end time in Milliseconds (optional)

MarketApi *apiInstance = [[MarketApi alloc] init];

// Get candlestick bars.
[apiInstance getCandlestickBarsWith:symbol
    interval:interval
    limit:limit
    startTime:startTime
    endTime:endTime
              completionHandler: ^(array[Candlestick] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.MarketApi()
var symbol = symbol_example; // {{String}} symbol
var interval = interval_example; // {{String}} interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
var opts = { 
  'limit': 56, // {{Integer}} default 300; max 1000.
  'startTime': 789, // {{Long}} start time in Milliseconds
  'endTime': 789 // {{Long}} end time in Milliseconds
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCandlestickBars(symbol, interval, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCandlestickBarsExample
    {
        public void main()
        {

            var apiInstance = new MarketApi();
            var symbol = symbol_example;  // String | symbol
            var interval = interval_example;  // String | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
            var limit = 56;  // Integer | default 300; max 1000. (optional) 
            var startTime = 789;  // Long | start time in Milliseconds (optional) 
            var endTime = 789;  // Long | end time in Milliseconds (optional) 

            try
            {
                // Get candlestick bars.
                array[Candlestick] result = apiInstance.getCandlestickBars(symbol, interval, limit, startTime, endTime);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MarketApi.getCandlestickBars: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMarketApi();
$symbol = symbol_example; // String | symbol
$interval = interval_example; // String | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
$limit = 56; // Integer | default 300; max 1000.
$startTime = 789; // Long | start time in Milliseconds
$endTime = 789; // Long | end time in Milliseconds

try {
    $result = $api_instance->getCandlestickBars($symbol, $interval, $limit, $startTime, $endTime);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MarketApi->getCandlestickBars: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MarketApi;

my $api_instance = WWW::SwaggerClient::MarketApi->new();
my $symbol = symbol_example; # String | symbol
my $interval = interval_example; # String | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
my $limit = 56; # Integer | default 300; max 1000.
my $startTime = 789; # Long | start time in Milliseconds
my $endTime = 789; # Long | end time in Milliseconds

eval { 
    my $result = $api_instance->getCandlestickBars(symbol => $symbol, interval => $interval, limit => $limit, startTime => $startTime, endTime => $endTime);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MarketApi->getCandlestickBars: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MarketApi()
symbol = symbol_example # String | symbol
interval = interval_example # String | interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
limit = 56 # Integer | default 300; max 1000. (optional)
startTime = 789 # Long | start time in Milliseconds (optional)
endTime = 789 # Long | end time in Milliseconds (optional)

try: 
    # Get candlestick bars.
    api_response = api_instance.get_candlestick_bars(symbol, interval, limit=limit, startTime=startTime, endTime=endTime)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MarketApi->getCandlestickBars: %s\n" % e)

Parameters

Query parameters
Name Description
symbol*
String
symbol
Required
interval*
String
interval. Allowed value: [1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M]
Required
limit
Integer (int32)
default 300; max 1000.
startTime
Long (int64)
start time in Milliseconds
endTime
Long (int64)
end time in Milliseconds

Responses

Status: 200 - OK


getDepth

Get the order book.

Gets the order book depth data for a given pair symbol. The given _limit_ must be one of the allowed limits below. **Destination:** Validator node. **Rate Limit:** 10 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/depth?symbol=xxx-000_BNB](https://dex.binance.org/api/v1/depth?symbol=xxx-000_BNB) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/depth?symbol=xxx-000_BNB](https://testnet-dex.binance.org/api/v1/depth?symbol=xxx-000_BNB)


/api/v1/depth

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/depth?symbol=&limit="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MarketApi;

import java.io.File;
import java.util.*;

public class MarketApiExample {

    public static void main(String[] args) {
        
        MarketApi apiInstance = new MarketApi();
        String symbol = symbol_example; // String | Market pair symbol, e.g. NNB-0AD_BNB
        Integer limit = 56; // Integer | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000]
        try {
            MarketDepth result = apiInstance.getDepth(symbol, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getDepth");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MarketApi;

public class MarketApiExample {

    public static void main(String[] args) {
        MarketApi apiInstance = new MarketApi();
        String symbol = symbol_example; // String | Market pair symbol, e.g. NNB-0AD_BNB
        Integer limit = 56; // Integer | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000]
        try {
            MarketDepth result = apiInstance.getDepth(symbol, limit);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getDepth");
            e.printStackTrace();
        }
    }
}
String *symbol = symbol_example; // Market pair symbol, e.g. NNB-0AD_BNB
Integer *limit = 56; // The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000] (optional)

MarketApi *apiInstance = [[MarketApi alloc] init];

// Get the order book.
[apiInstance getDepthWith:symbol
    limit:limit
              completionHandler: ^(MarketDepth output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.MarketApi()
var symbol = symbol_example; // {{String}} Market pair symbol, e.g. NNB-0AD_BNB
var opts = { 
  'limit': 56 // {{Integer}} The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000]
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDepth(symbol, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDepthExample
    {
        public void main()
        {

            var apiInstance = new MarketApi();
            var symbol = symbol_example;  // String | Market pair symbol, e.g. NNB-0AD_BNB
            var limit = 56;  // Integer | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000] (optional) 

            try
            {
                // Get the order book.
                MarketDepth result = apiInstance.getDepth(symbol, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MarketApi.getDepth: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMarketApi();
$symbol = symbol_example; // String | Market pair symbol, e.g. NNB-0AD_BNB
$limit = 56; // Integer | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000]

try {
    $result = $api_instance->getDepth($symbol, $limit);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MarketApi->getDepth: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MarketApi;

my $api_instance = WWW::SwaggerClient::MarketApi->new();
my $symbol = symbol_example; # String | Market pair symbol, e.g. NNB-0AD_BNB
my $limit = 56; # Integer | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000]

eval { 
    my $result = $api_instance->getDepth(symbol => $symbol, limit => $limit);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MarketApi->getDepth: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MarketApi()
symbol = symbol_example # String | Market pair symbol, e.g. NNB-0AD_BNB
limit = 56 # Integer | The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000] (optional)

try: 
    # Get the order book.
    api_response = api_instance.get_depth(symbol, limit=limit)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MarketApi->getDepth: %s\n" % e)

Parameters

Query parameters
Name Description
symbol*
String
Market pair symbol, e.g. NNB-0AD_BNB
Required
limit
Integer (int32)
The limit of results. Allowed limits: [5, 10, 20, 50, 100, 500, 1000]

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getFees

Obtain trading fees information.

Gets the current trading fees settings. **Destination:** Witness node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/fees](https://dex.binance.org/api/v1/fees) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/fees](https://testnet-dex.binance.org/api/v1/fees)


/api/v1/fees

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/fees"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MarketApi;

import java.io.File;
import java.util.*;

public class MarketApiExample {

    public static void main(String[] args) {
        
        MarketApi apiInstance = new MarketApi();
        try {
            array[Fee] result = apiInstance.getFees();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getFees");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MarketApi;

public class MarketApiExample {

    public static void main(String[] args) {
        MarketApi apiInstance = new MarketApi();
        try {
            array[Fee] result = apiInstance.getFees();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getFees");
            e.printStackTrace();
        }
    }
}

MarketApi *apiInstance = [[MarketApi alloc] init];

// Obtain trading fees information.
[apiInstance getFeesWithCompletionHandler: 
              ^(array[Fee] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.MarketApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFees(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFeesExample
    {
        public void main()
        {

            var apiInstance = new MarketApi();

            try
            {
                // Obtain trading fees information.
                array[Fee] result = apiInstance.getFees();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MarketApi.getFees: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMarketApi();

try {
    $result = $api_instance->getFees();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MarketApi->getFees: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MarketApi;

my $api_instance = WWW::SwaggerClient::MarketApi->new();

eval { 
    my $result = $api_instance->getFees();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MarketApi->getFees: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MarketApi()

try: 
    # Obtain trading fees information.
    api_response = api_instance.get_fees()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MarketApi->getFees: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: default - Generic error response


getPairs

Get market pairs.

Gets the list of market pairs that have been listed. **Destination:** Witness node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/markets](https://dex.binance.org/api/v1/markets) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/markets](https://testnet-dex.binance.org/api/v1/markets)


/api/v1/markets

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/markets?limit=&offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MarketApi;

import java.io.File;
import java.util.*;

public class MarketApiExample {

    public static void main(String[] args) {
        
        MarketApi apiInstance = new MarketApi();
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        try {
            array[Market] result = apiInstance.getPairs(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getPairs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MarketApi;

public class MarketApiExample {

    public static void main(String[] args) {
        MarketApi apiInstance = new MarketApi();
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        try {
            array[Market] result = apiInstance.getPairs(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MarketApi#getPairs");
            e.printStackTrace();
        }
    }
}
Integer *limit = 56; // default 500; max 1000. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)

MarketApi *apiInstance = [[MarketApi alloc] init];

// Get market pairs.
[apiInstance getPairsWith:limit
    offset:offset
              completionHandler: ^(array[Market] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.MarketApi()
var opts = { 
  'limit': 56, // {{Integer}} default 500; max 1000.
  'offset': 56 // {{Integer}} start with 0; default 0.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPairs(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPairsExample
    {
        public void main()
        {

            var apiInstance = new MarketApi();
            var limit = 56;  // Integer | default 500; max 1000. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 

            try
            {
                // Get market pairs.
                array[Market] result = apiInstance.getPairs(limit, offset);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MarketApi.getPairs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMarketApi();
$limit = 56; // Integer | default 500; max 1000.
$offset = 56; // Integer | start with 0; default 0.

try {
    $result = $api_instance->getPairs($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MarketApi->getPairs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MarketApi;

my $api_instance = WWW::SwaggerClient::MarketApi->new();
my $limit = 56; # Integer | default 500; max 1000.
my $offset = 56; # Integer | start with 0; default 0.

eval { 
    my $result = $api_instance->getPairs(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MarketApi->getPairs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MarketApi()
limit = 56 # Integer | default 500; max 1000. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)

try: 
    # Get market pairs.
    api_response = api_instance.get_pairs(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MarketApi->getPairs: %s\n" % e)

Parameters

Query parameters
Name Description
limit
Integer (int32)
default 500; max 1000.
offset
Integer (int32)
start with 0; default 0.

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


Misc

getTime

Get the block time.

Gets the latest block time and the current time according to the HTTP service. **Destination:** Validator node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/time](https://dex.binance.org/api/v1/time) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/time](https://testnet-dex.binance.org/api/v1/time)


/api/v1/time

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/time"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MiscApi;

import java.io.File;
import java.util.*;

public class MiscApiExample {

    public static void main(String[] args) {
        
        MiscApi apiInstance = new MiscApi();
        try {
            Times result = apiInstance.getTime();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscApi#getTime");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MiscApi;

public class MiscApiExample {

    public static void main(String[] args) {
        MiscApi apiInstance = new MiscApi();
        try {
            Times result = apiInstance.getTime();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MiscApi#getTime");
            e.printStackTrace();
        }
    }
}

MiscApi *apiInstance = [[MiscApi alloc] init];

// Get the block time.
[apiInstance getTimeWithCompletionHandler: 
              ^(Times output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.MiscApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTime(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTimeExample
    {
        public void main()
        {

            var apiInstance = new MiscApi();

            try
            {
                // Get the block time.
                Times result = apiInstance.getTime();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MiscApi.getTime: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiMiscApi();

try {
    $result = $api_instance->getTime();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MiscApi->getTime: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MiscApi;

my $api_instance = WWW::SwaggerClient::MiscApi->new();

eval { 
    my $result = $api_instance->getTime();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MiscApi->getTime: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MiscApi()

try: 
    # Get the block time.
    api_response = api_instance.get_time()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MiscApi->getTime: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


Node

broadcastTx

Broadcast a transaction.

Broadcasts a signed transaction. A single transaction must be sent hex-encoded with a `content-type` of `text/plain`. **Destination:** Witness node. **Rate Limit:** 5 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/broadcast](https://dex.binance.org/api/v1/broadcast) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/broadcast](https://testnet-dex.binance.org/api/v1/broadcast)


/api/v1/broadcast

Usage and SDK Samples

curl -X POST "https://dex.binance.org/api/v1/broadcast?sync="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        Object body = ; // Object | 
        Boolean sync = true; // Boolean | Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?

        try {
            array[Transaction] result = apiInstance.broadcastTx(body, sync);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#broadcastTx");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        Object body = ; // Object | 
        Boolean sync = true; // Boolean | Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?

        try {
            array[Transaction] result = apiInstance.broadcastTx(body, sync);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#broadcastTx");
            e.printStackTrace();
        }
    }
}
Object *body = ; // 
Boolean *sync = true; // Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?
 (optional)

NodeApi *apiInstance = [[NodeApi alloc] init];

// Broadcast a transaction.
[apiInstance broadcastTxWith:body
    sync:sync
              completionHandler: ^(array[Transaction] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var body = ; // {{Object}} 
var opts = { 
  'sync': true // {{Boolean}} Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?

};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.broadcastTx(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class broadcastTxExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();
            var body = new Object(); // Object | 
            var sync = true;  // Boolean | Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?
 (optional) 

            try
            {
                // Broadcast a transaction.
                array[Transaction] result = apiInstance.broadcastTx(body, sync);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.broadcastTx: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();
$body = ; // Object | 
$sync = true; // Boolean | Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?


try {
    $result = $api_instance->broadcastTx($body, $sync);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->broadcastTx: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();
my $body = WWW::SwaggerClient::Object::Object->new(); # Object | 
my $sync = true; # Boolean | Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?


eval { 
    my $result = $api_instance->broadcastTx(body => $body, sync => $sync);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->broadcastTx: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()
body =  # Object | 
sync = true # Boolean | Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?
 (optional)

try: 
    # Broadcast a transaction.
    api_response = api_instance.broadcast_tx(body, sync=sync)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->broadcastTx: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
sync
Boolean
Synchronous broadcast (wait for [DeliverTx](https://github.com/tendermint/tendermint/wiki/Application-Developers#delivertx))?

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Bad Signature

Status: 404 - Not Found

Status: default - Generic error response


getAccount

Get an account.

Gets account metadata for an address. **Destination:** Witness node. **Rate Limit:** 5 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m](https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/account/tbnb185tqzq3j6y7yep85lncaz9qeectjxqe5054cgn](https://testnet-dex.binance.org/api/v1/account/tbnb185tqzq3j6y7yep85lncaz9qeectjxqe5054cgn)


/api/v1/account/{address}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/account/{address}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        String address = address_example; // String | The account address to query
        try {
            Account result = apiInstance.getAccount(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getAccount");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        String address = address_example; // String | The account address to query
        try {
            Account result = apiInstance.getAccount(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getAccount");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // The account address to query

NodeApi *apiInstance = [[NodeApi alloc] init];

// Get an account.
[apiInstance getAccountWith:address
              completionHandler: ^(Account output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var address = address_example; // {{String}} The account address to query

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccount(address, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAccountExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();
            var address = address_example;  // String | The account address to query

            try
            {
                // Get an account.
                Account result = apiInstance.getAccount(address);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getAccount: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();
$address = address_example; // String | The account address to query

try {
    $result = $api_instance->getAccount($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getAccount: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();
my $address = address_example; # String | The account address to query

eval { 
    my $result = $api_instance->getAccount(address => $address);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getAccount: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()
address = address_example # String | The account address to query

try: 
    # Get an account.
    api_response = api_instance.get_account(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getAccount: %s\n" % e)

Parameters

Path parameters
Name Description
address*
String
The account address to query
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getAccountSequence

Get an account sequence.

Gets an account sequence for an address. **Destination:** Validator node. **Rate Limit:** 5 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m/sequence](https://dex.binance.org/api/v1/account/bnb1jxfh2g85q3v0tdq56fnevx6xcxtcnhtsmcu64m/sequence) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/account/tbnb13g2le062t340klgm2l2khzr57y3qxlekuhfuch/sequence](https://testnet-dex.binance.org/api/v1/account/tbnb13g2le062t340klgm2l2khzr57y3qxlekuhfuch/sequence)


/api/v1/account/{address}/sequence

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/account/{address}/sequence"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        String address = address_example; // String | The account address to query
        try {
            AccountSequence result = apiInstance.getAccountSequence(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getAccountSequence");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        String address = address_example; // String | The account address to query
        try {
            AccountSequence result = apiInstance.getAccountSequence(address);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getAccountSequence");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // The account address to query

NodeApi *apiInstance = [[NodeApi alloc] init];

// Get an account sequence.
[apiInstance getAccountSequenceWith:address
              completionHandler: ^(AccountSequence output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var address = address_example; // {{String}} The account address to query

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAccountSequence(address, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAccountSequenceExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();
            var address = address_example;  // String | The account address to query

            try
            {
                // Get an account sequence.
                AccountSequence result = apiInstance.getAccountSequence(address);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getAccountSequence: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();
$address = address_example; // String | The account address to query

try {
    $result = $api_instance->getAccountSequence($address);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getAccountSequence: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();
my $address = address_example; # String | The account address to query

eval { 
    my $result = $api_instance->getAccountSequence(address => $address);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getAccountSequence: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()
address = address_example # String | The account address to query

try: 
    # Get an account sequence.
    api_response = api_instance.get_account_sequence(address)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getAccountSequence: %s\n" % e)

Parameters

Path parameters
Name Description
address*
String
The account address to query
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getNodeInfo

Get node information.

Gets runtime information about the node. Return block height, current timestamp and the number of connected peers. **Destination:** Validator node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/node-info](https://dex.binance.org/api/v1/node-info) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/node-info](https://testnet-dex.binance.org/api/v1/node-info)


/api/v1/node-info

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/node-info"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        try {
            ResultStatus result = apiInstance.getNodeInfo();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getNodeInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        try {
            ResultStatus result = apiInstance.getNodeInfo();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getNodeInfo");
            e.printStackTrace();
        }
    }
}

NodeApi *apiInstance = [[NodeApi alloc] init];

// Get node information.
[apiInstance getNodeInfoWithCompletionHandler: 
              ^(ResultStatus output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeInfo(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeInfoExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();

            try
            {
                // Get node information.
                ResultStatus result = apiInstance.getNodeInfo();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getNodeInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();

try {
    $result = $api_instance->getNodeInfo();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getNodeInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();

eval { 
    my $result = $api_instance->getNodeInfo();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getNodeInfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()

try: 
    # Get node information.
    api_response = api_instance.get_node_info()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getNodeInfo: %s\n" % e)

Parameters

Responses

Status: 200 - Success


getPeers

Get network peers.

Gets the list of network peers. **Destination:** Witness node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/peers](https://dex.binance.org/api/v1/peers) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/peers](https://testnet-dex.binance.org/api/v1/peers)


/api/v1/peers

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/peers"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        try {
            array[Peer] result = apiInstance.getPeers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getPeers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        try {
            array[Peer] result = apiInstance.getPeers();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getPeers");
            e.printStackTrace();
        }
    }
}

NodeApi *apiInstance = [[NodeApi alloc] init];

// Get network peers.
[apiInstance getPeersWithCompletionHandler: 
              ^(array[Peer] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPeers(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPeersExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();

            try
            {
                // Get network peers.
                array[Peer] result = apiInstance.getPeers();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getPeers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();

try {
    $result = $api_instance->getPeers();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getPeers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();

eval { 
    my $result = $api_instance->getPeers();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getPeers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()

try: 
    # Get network peers.
    api_response = api_instance.get_peers()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getPeers: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getTimeLocks

Gets time lock records given an address


/api/v1/timelocks/{address}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/timelocks/{address}?id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        String address = address_example; // String | The account address to query
        Long id = 789; // Long | the record id of timelock to query
        try {
            TimeLocks result = apiInstance.getTimeLocks(address, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getTimeLocks");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        String address = address_example; // String | The account address to query
        Long id = 789; // Long | the record id of timelock to query
        try {
            TimeLocks result = apiInstance.getTimeLocks(address, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getTimeLocks");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // The account address to query
Long *id = 789; // the record id of timelock to query (optional)

NodeApi *apiInstance = [[NodeApi alloc] init];

// Gets time lock records given an address
[apiInstance getTimeLocksWith:address
    id:id
              completionHandler: ^(TimeLocks output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var address = address_example; // {{String}} The account address to query
var opts = { 
  'id': 789 // {{Long}} the record id of timelock to query
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTimeLocks(address, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTimeLocksExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();
            var address = address_example;  // String | The account address to query
            var id = 789;  // Long | the record id of timelock to query (optional) 

            try
            {
                // Gets time lock records given an address
                TimeLocks result = apiInstance.getTimeLocks(address, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getTimeLocks: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();
$address = address_example; // String | The account address to query
$id = 789; // Long | the record id of timelock to query

try {
    $result = $api_instance->getTimeLocks($address, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getTimeLocks: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();
my $address = address_example; # String | The account address to query
my $id = 789; # Long | the record id of timelock to query

eval { 
    my $result = $api_instance->getTimeLocks(address => $address, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getTimeLocks: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()
address = address_example # String | The account address to query
id = 789 # Long | the record id of timelock to query (optional)

try: 
    # Gets time lock records given an address
    api_response = api_instance.get_time_locks(address, id=id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getTimeLocks: %s\n" % e)

Parameters

Path parameters
Name Description
address*
String
The account address to query
Required
Query parameters
Name Description
id
Long (int64)
the record id of timelock to query

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 500 - internal server error


getTransaction

Get a transaction.

Gets transaction metadata by transaction ID. By default, transactions are returned in a raw format. You may add `?format=json` to the end of the path to obtain a more readable response. **Destination:** Seed node. **Rate Limit:** 10 requests per IP per second. **Example:** Below is an example response of a send transaction when `?format=json` is used. ``` { code:0, hash:"433806D6A4AB6359CB56EC55BA99896DFAB2AF11326B74881A2ABA7049C492D3", height:"7850389", log:"Msg 0: ", ok:true, tx:{ type:"auth/StdTx", value:{ data:null, memo:"101192150", msg:[ { type:"cosmos-sdk/Send", value:{ inputs:[ { address:"bnb1jafs33u9u6f7w7wzfmm4rr9rzy2cgqzp78kwaw", coins:[ { amount:"496429373", denom:"BNB", } ], } ], outputs:[ { address:"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23", coins:[ { amount:"496429373", denom:"BNB", } ], } ], }, } ], signatures:[ { account_number:"438", pub_key:{ type:"tendermint/PubKeySecp256k1", value:"A3mfgg/i12XNyy9esqCjI7yrkrOs9dngP7c9cDUEJly5", }, sequence:"0", signature:"VvvGz3qbyirJ7vv01Df8tuAd7K4I+HK+yEBfep+qwtMKuHWQQH3XtMB9Pqtc2jlia0AtDe+BUEMtIyh3/N66IQ==", } ], source:"1", }, }, } ```


/api/v1/tx/{hash}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/tx/{hash}?format="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        String hash = hash_example; // String | The transaction hash to query
        String format = format_example; // String | Response format (`json` or amino)
        try {
            Transaction result = apiInstance.getTransaction(hash, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getTransaction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        String hash = hash_example; // String | The transaction hash to query
        String format = format_example; // String | Response format (`json` or amino)
        try {
            Transaction result = apiInstance.getTransaction(hash, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getTransaction");
            e.printStackTrace();
        }
    }
}
String *hash = hash_example; // The transaction hash to query
String *format = format_example; // Response format (`json` or amino) (optional)

NodeApi *apiInstance = [[NodeApi alloc] init];

// Get a transaction.
[apiInstance getTransactionWith:hash
    format:format
              completionHandler: ^(Transaction output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var hash = hash_example; // {{String}} The transaction hash to query
var opts = { 
  'format': format_example // {{String}} Response format (`json` or amino)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTransaction(hash, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTransactionExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();
            var hash = hash_example;  // String | The transaction hash to query
            var format = format_example;  // String | Response format (`json` or amino) (optional) 

            try
            {
                // Get a transaction.
                Transaction result = apiInstance.getTransaction(hash, format);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();
$hash = hash_example; // String | The transaction hash to query
$format = format_example; // String | Response format (`json` or amino)

try {
    $result = $api_instance->getTransaction($hash, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();
my $hash = hash_example; # String | The transaction hash to query
my $format = format_example; # String | Response format (`json` or amino)

eval { 
    my $result = $api_instance->getTransaction(hash => $hash, format => $format);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getTransaction: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()
hash = hash_example # String | The transaction hash to query
format = format_example # String | Response format (`json` or amino) (optional)

try: 
    # Get a transaction.
    api_response = api_instance.get_transaction(hash, format=format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getTransaction: %s\n" % e)

Parameters

Path parameters
Name Description
hash*
String
The transaction hash to query
Required
Query parameters
Name Description
format
String
Response format (`json` or amino)

Responses

Status: 200 - Success

Status: 404 - Not Found

Status: 500 - Bad Request

Status: default - Generic error response


getValidators

Get validators.

Gets the list of validators used in consensus. **Destination:** Witness node. **Rate Limit:** 10 requests per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/validators](https://dex.binance.org/api/v1/validators) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/validators](https://testnet-dex.binance.org/api/v1/validators)


/api/v1/validators

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/validators"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodeApi;

import java.io.File;
import java.util.*;

public class NodeApiExample {

    public static void main(String[] args) {
        
        NodeApi apiInstance = new NodeApi();
        try {
            array[Validators] result = apiInstance.getValidators();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getValidators");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodeApi;

public class NodeApiExample {

    public static void main(String[] args) {
        NodeApi apiInstance = new NodeApi();
        try {
            array[Validators] result = apiInstance.getValidators();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodeApi#getValidators");
            e.printStackTrace();
        }
    }
}

NodeApi *apiInstance = [[NodeApi alloc] init];

// Get validators.
[apiInstance getValidatorsWithCompletionHandler: 
              ^(array[Validators] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.NodeApi()
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getValidators(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getValidatorsExample
    {
        public void main()
        {

            var apiInstance = new NodeApi();

            try
            {
                // Get validators.
                array[Validators] result = apiInstance.getValidators();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodeApi.getValidators: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiNodeApi();

try {
    $result = $api_instance->getValidators();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodeApi->getValidators: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodeApi;

my $api_instance = WWW::SwaggerClient::NodeApi->new();

eval { 
    my $result = $api_instance->getValidators();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodeApi->getValidators: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodeApi()

try: 
    # Get validators.
    api_response = api_instance.get_validators()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodeApi->getValidators: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


Order

getClosedOrders

Get closed orders.

Gets closed (filled and cancelled) orders for a given address. **Query Window:** Default query window is latest 7 days; The maximum start - end query window is 3 months. **Rate Limit:** 5 requests per IP per second.


/api/v1/orders/closed

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/orders/closed?address=&end=&limit=&offset=&side=&start=&status=&symbol=&total="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApi;

import java.io.File;
import java.util.*;

public class OrderApiExample {

    public static void main(String[] args) {
        
        OrderApi apiInstance = new OrderApi();
        String address = address_example; // String | the owner address
        Long end = 789; // Long | end time in Milliseconds
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        Integer side = 56; // Integer | order side. 1 for buy and 2 for sell.
        Long start = 789; // Long | start time in Milliseconds
        String status = status_example; // String | order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]

        String symbol = symbol_example; // String | symbol
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            OrderList result = apiInstance.getClosedOrders(address, end, limit, offset, side, start, status, symbol, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApi#getClosedOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApi;

public class OrderApiExample {

    public static void main(String[] args) {
        OrderApi apiInstance = new OrderApi();
        String address = address_example; // String | the owner address
        Long end = 789; // Long | end time in Milliseconds
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        Integer side = 56; // Integer | order side. 1 for buy and 2 for sell.
        Long start = 789; // Long | start time in Milliseconds
        String status = status_example; // String | order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]

        String symbol = symbol_example; // String | symbol
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            OrderList result = apiInstance.getClosedOrders(address, end, limit, offset, side, start, status, symbol, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApi#getClosedOrders");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // the owner address
Long *end = 789; // end time in Milliseconds (optional)
Integer *limit = 56; // default 500; max 1000. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)
Integer *side = 56; // order side. 1 for buy and 2 for sell. (optional)
Long *start = 789; // start time in Milliseconds (optional)
String *status = status_example; // order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]
 (optional)
String *symbol = symbol_example; // symbol (optional)
Integer *total = 56; // total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

OrderApi *apiInstance = [[OrderApi alloc] init];

// Get closed orders.
[apiInstance getClosedOrdersWith:address
    end:end
    limit:limit
    offset:offset
    side:side
    start:start
    status:status
    symbol:symbol
    total:total
              completionHandler: ^(OrderList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.OrderApi()
var address = address_example; // {{String}} the owner address
var opts = { 
  'end': 789, // {{Long}} end time in Milliseconds
  'limit': 56, // {{Integer}} default 500; max 1000.
  'offset': 56, // {{Integer}} start with 0; default 0.
  'side': 56, // {{Integer}} order side. 1 for buy and 2 for sell.
  'start': 789, // {{Long}} start time in Milliseconds
  'status': status_example, // {{String}} order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]

  'symbol': symbol_example, // {{String}} symbol
  'total': 56 // {{Integer}} total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getClosedOrders(address, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getClosedOrdersExample
    {
        public void main()
        {

            var apiInstance = new OrderApi();
            var address = address_example;  // String | the owner address
            var end = 789;  // Long | end time in Milliseconds (optional) 
            var limit = 56;  // Integer | default 500; max 1000. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 
            var side = 56;  // Integer | order side. 1 for buy and 2 for sell. (optional) 
            var start = 789;  // Long | start time in Milliseconds (optional) 
            var status = status_example;  // String | order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]
 (optional) 
            var symbol = symbol_example;  // String | symbol (optional) 
            var total = 56;  // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional) 

            try
            {
                // Get closed orders.
                OrderList result = apiInstance.getClosedOrders(address, end, limit, offset, side, start, status, symbol, total);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApi.getClosedOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderApi();
$address = address_example; // String | the owner address
$end = 789; // Long | end time in Milliseconds
$limit = 56; // Integer | default 500; max 1000.
$offset = 56; // Integer | start with 0; default 0.
$side = 56; // Integer | order side. 1 for buy and 2 for sell.
$start = 789; // Long | start time in Milliseconds
$status = status_example; // String | order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]

$symbol = symbol_example; // String | symbol
$total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

try {
    $result = $api_instance->getClosedOrders($address, $end, $limit, $offset, $side, $start, $status, $symbol, $total);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->getClosedOrders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApi;

my $api_instance = WWW::SwaggerClient::OrderApi->new();
my $address = address_example; # String | the owner address
my $end = 789; # Long | end time in Milliseconds
my $limit = 56; # Integer | default 500; max 1000.
my $offset = 56; # Integer | start with 0; default 0.
my $side = 56; # Integer | order side. 1 for buy and 2 for sell.
my $start = 789; # Long | start time in Milliseconds
my $status = status_example; # String | order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]

my $symbol = symbol_example; # String | symbol
my $total = 56; # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

eval { 
    my $result = $api_instance->getClosedOrders(address => $address, end => $end, limit => $limit, offset => $offset, side => $side, start => $start, status => $status, symbol => $symbol, total => $total);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApi->getClosedOrders: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OrderApi()
address = address_example # String | the owner address
end = 789 # Long | end time in Milliseconds (optional)
limit = 56 # Integer | default 500; max 1000. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)
side = 56 # Integer | order side. 1 for buy and 2 for sell. (optional)
start = 789 # Long | start time in Milliseconds (optional)
status = status_example # String | order status list. 
Allowed value: [Ack, IocExpire, IocNoFill,
FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]
 (optional)
symbol = symbol_example # String | symbol (optional)
total = 56 # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

try: 
    # Get closed orders.
    api_response = api_instance.get_closed_orders(address, end=end, limit=limit, offset=offset, side=side, start=start, status=status, symbol=symbol, total=total)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApi->getClosedOrders: %s\n" % e)

Parameters

Query parameters
Name Description
address*
String
the owner address
Required
end
Long (int64)
end time in Milliseconds
limit
Integer (int32)
default 500; max 1000.
offset
Integer (int32)
start with 0; default 0.
side
Integer (int32)
order side. 1 for buy and 2 for sell.
start
Long (int64)
start time in Milliseconds
status
String
order status list. Allowed value: [Ack, IocExpire, IocNoFill, FullyFill, Canceled, Expired, FailedBlocking, FailedMatching]
symbol
String
symbol
total
Integer (int32)
total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

Responses

Status: 200 - OK


getOpenOrders

Get open orders.

Gets open orders for a given address. **Rate Limit:** 5 requests per IP per second.


/api/v1/orders/open

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/orders/open?address=&limit=&offset=&symbol=&total="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApi;

import java.io.File;
import java.util.*;

public class OrderApiExample {

    public static void main(String[] args) {
        
        OrderApi apiInstance = new OrderApi();
        String address = address_example; // String | the owner address
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        String symbol = symbol_example; // String | symbol
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            OrderList result = apiInstance.getOpenOrders(address, limit, offset, symbol, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApi#getOpenOrders");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApi;

public class OrderApiExample {

    public static void main(String[] args) {
        OrderApi apiInstance = new OrderApi();
        String address = address_example; // String | the owner address
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        String symbol = symbol_example; // String | symbol
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            OrderList result = apiInstance.getOpenOrders(address, limit, offset, symbol, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApi#getOpenOrders");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // the owner address
Integer *limit = 56; // default 500; max 1000. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)
String *symbol = symbol_example; // symbol (optional)
Integer *total = 56; // total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

OrderApi *apiInstance = [[OrderApi alloc] init];

// Get open orders.
[apiInstance getOpenOrdersWith:address
    limit:limit
    offset:offset
    symbol:symbol
    total:total
              completionHandler: ^(OrderList output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.OrderApi()
var address = address_example; // {{String}} the owner address
var opts = { 
  'limit': 56, // {{Integer}} default 500; max 1000.
  'offset': 56, // {{Integer}} start with 0; default 0.
  'symbol': symbol_example, // {{String}} symbol
  'total': 56 // {{Integer}} total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOpenOrders(address, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOpenOrdersExample
    {
        public void main()
        {

            var apiInstance = new OrderApi();
            var address = address_example;  // String | the owner address
            var limit = 56;  // Integer | default 500; max 1000. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 
            var symbol = symbol_example;  // String | symbol (optional) 
            var total = 56;  // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional) 

            try
            {
                // Get open orders.
                OrderList result = apiInstance.getOpenOrders(address, limit, offset, symbol, total);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApi.getOpenOrders: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderApi();
$address = address_example; // String | the owner address
$limit = 56; // Integer | default 500; max 1000.
$offset = 56; // Integer | start with 0; default 0.
$symbol = symbol_example; // String | symbol
$total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

try {
    $result = $api_instance->getOpenOrders($address, $limit, $offset, $symbol, $total);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->getOpenOrders: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApi;

my $api_instance = WWW::SwaggerClient::OrderApi->new();
my $address = address_example; # String | the owner address
my $limit = 56; # Integer | default 500; max 1000.
my $offset = 56; # Integer | start with 0; default 0.
my $symbol = symbol_example; # String | symbol
my $total = 56; # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

eval { 
    my $result = $api_instance->getOpenOrders(address => $address, limit => $limit, offset => $offset, symbol => $symbol, total => $total);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApi->getOpenOrders: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OrderApi()
address = address_example # String | the owner address
limit = 56 # Integer | default 500; max 1000. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)
symbol = symbol_example # String | symbol (optional)
total = 56 # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

try: 
    # Get open orders.
    api_response = api_instance.get_open_orders(address, limit=limit, offset=offset, symbol=symbol, total=total)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApi->getOpenOrders: %s\n" % e)

Parameters

Query parameters
Name Description
address*
String
the owner address
Required
limit
Integer (int32)
default 500; max 1000.
offset
Integer (int32)
start with 0; default 0.
symbol
String
symbol
total
Integer (int32)
total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


getOrder

Get an order.

Gets metadata for an individual order by its ID. **Rate Limit:** 5 requests per IP per second.


/api/v1/orders/{id}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/orders/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.OrderApi;

import java.io.File;
import java.util.*;

public class OrderApiExample {

    public static void main(String[] args) {
        
        OrderApi apiInstance = new OrderApi();
        String id = id_example; // String | order id
        try {
            Order result = apiInstance.getOrder(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApi#getOrder");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.OrderApi;

public class OrderApiExample {

    public static void main(String[] args) {
        OrderApi apiInstance = new OrderApi();
        String id = id_example; // String | order id
        try {
            Order result = apiInstance.getOrder(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling OrderApi#getOrder");
            e.printStackTrace();
        }
    }
}
String *id = id_example; // order id

OrderApi *apiInstance = [[OrderApi alloc] init];

// Get an order.
[apiInstance getOrderWith:id
              completionHandler: ^(Order output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.OrderApi()
var id = id_example; // {{String}} order id

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getOrder(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getOrderExample
    {
        public void main()
        {

            var apiInstance = new OrderApi();
            var id = id_example;  // String | order id

            try
            {
                // Get an order.
                Order result = apiInstance.getOrder(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling OrderApi.getOrder: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiOrderApi();
$id = id_example; // String | order id

try {
    $result = $api_instance->getOrder($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->getOrder: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::OrderApi;

my $api_instance = WWW::SwaggerClient::OrderApi->new();
my $id = id_example; # String | order id

eval { 
    my $result = $api_instance->getOrder(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling OrderApi->getOrder: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.OrderApi()
id = id_example # String | order id

try: 
    # Get an order.
    api_response = api_instance.get_order(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling OrderApi->getOrder: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
order id
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


TimelockRecords

getTimeLock

Get timelock records of an address.

Get the timelock history of an address. **Rate Limit:** 60 requests per IP per minute.


/api/v1/timelock/{account_addr}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/timelock/{account_addr}?id="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TimelockRecordsApi;

import java.io.File;
import java.util.*;

public class TimelockRecordsApiExample {

    public static void main(String[] args) {
        
        TimelockRecordsApi apiInstance = new TimelockRecordsApi();
        String accountAddr = accountAddr_example; // String | The account address to query
        Long id = 789; // Long | the record id of timelock to query
        try {
            TimeLocks result = apiInstance.getTimeLock(accountAddr, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TimelockRecordsApi#getTimeLock");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TimelockRecordsApi;

public class TimelockRecordsApiExample {

    public static void main(String[] args) {
        TimelockRecordsApi apiInstance = new TimelockRecordsApi();
        String accountAddr = accountAddr_example; // String | The account address to query
        Long id = 789; // Long | the record id of timelock to query
        try {
            TimeLocks result = apiInstance.getTimeLock(accountAddr, id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TimelockRecordsApi#getTimeLock");
            e.printStackTrace();
        }
    }
}
String *accountAddr = accountAddr_example; // The account address to query
Long *id = 789; // the record id of timelock to query (optional)

TimelockRecordsApi *apiInstance = [[TimelockRecordsApi alloc] init];

// Get timelock records of an address.
[apiInstance getTimeLockWith:accountAddr
    id:id
              completionHandler: ^(TimeLocks output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TimelockRecordsApi()
var accountAddr = accountAddr_example; // {{String}} The account address to query
var opts = { 
  'id': 789 // {{Long}} the record id of timelock to query
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTimeLock(accountAddr, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTimeLockExample
    {
        public void main()
        {

            var apiInstance = new TimelockRecordsApi();
            var accountAddr = accountAddr_example;  // String | The account address to query
            var id = 789;  // Long | the record id of timelock to query (optional) 

            try
            {
                // Get timelock records of an address.
                TimeLocks result = apiInstance.getTimeLock(accountAddr, id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TimelockRecordsApi.getTimeLock: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTimelockRecordsApi();
$accountAddr = accountAddr_example; // String | The account address to query
$id = 789; // Long | the record id of timelock to query

try {
    $result = $api_instance->getTimeLock($accountAddr, $id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TimelockRecordsApi->getTimeLock: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TimelockRecordsApi;

my $api_instance = WWW::SwaggerClient::TimelockRecordsApi->new();
my $accountAddr = accountAddr_example; # String | The account address to query
my $id = 789; # Long | the record id of timelock to query

eval { 
    my $result = $api_instance->getTimeLock(accountAddr => $accountAddr, id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TimelockRecordsApi->getTimeLock: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TimelockRecordsApi()
accountAddr = accountAddr_example # String | The account address to query
id = 789 # Long | the record id of timelock to query (optional)

try: 
    # Get timelock records of an address.
    api_response = api_instance.get_time_lock(accountAddr, id=id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TimelockRecordsApi->getTimeLock: %s\n" % e)

Parameters

Path parameters
Name Description
account_addr*
String
The account address to query
Required
Query parameters
Name Description
id
Long (int64)
the record id of timelock to query

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: 500 - internal server error


Tokens

getTokens

Get tokens list.

Gets a list of tokens that have been issued. **Destination:** Witness node. **Rate Limit:** 1 request per IP per second. **URL for mainnet:** [https://dex.binance.org/api/v1/tokens](https://dex.binance.org/api/v1/tokens) **URL for testnet:** [https://testnet-dex.binance.org/api/v1/tokens](https://testnet-dex.binance.org/api/v1/tokens)


/api/v1/tokens

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/tokens?limit=&offset="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TokensApi;

import java.io.File;
import java.util.*;

public class TokensApiExample {

    public static void main(String[] args) {
        
        TokensApi apiInstance = new TokensApi();
        Integer limit = 56; // Integer | default 100.
        Integer offset = 56; // Integer | start with 0; default 0.
        try {
            array[Token] result = apiInstance.getTokens(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TokensApi#getTokens");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TokensApi;

public class TokensApiExample {

    public static void main(String[] args) {
        TokensApi apiInstance = new TokensApi();
        Integer limit = 56; // Integer | default 100.
        Integer offset = 56; // Integer | start with 0; default 0.
        try {
            array[Token] result = apiInstance.getTokens(limit, offset);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TokensApi#getTokens");
            e.printStackTrace();
        }
    }
}
Integer *limit = 56; // default 100. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)

TokensApi *apiInstance = [[TokensApi alloc] init];

// Get tokens list.
[apiInstance getTokensWith:limit
    offset:offset
              completionHandler: ^(array[Token] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TokensApi()
var opts = { 
  'limit': 56, // {{Integer}} default 100.
  'offset': 56 // {{Integer}} start with 0; default 0.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTokens(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTokensExample
    {
        public void main()
        {

            var apiInstance = new TokensApi();
            var limit = 56;  // Integer | default 100. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 

            try
            {
                // Get tokens list.
                array[Token] result = apiInstance.getTokens(limit, offset);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TokensApi.getTokens: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTokensApi();
$limit = 56; // Integer | default 100.
$offset = 56; // Integer | start with 0; default 0.

try {
    $result = $api_instance->getTokens($limit, $offset);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TokensApi->getTokens: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TokensApi;

my $api_instance = WWW::SwaggerClient::TokensApi->new();
my $limit = 56; # Integer | default 100.
my $offset = 56; # Integer | start with 0; default 0.

eval { 
    my $result = $api_instance->getTokens(limit => $limit, offset => $offset);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TokensApi->getTokens: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TokensApi()
limit = 56 # Integer | default 100. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)

try: 
    # Get tokens list.
    api_response = api_instance.get_tokens(limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TokensApi->getTokens: %s\n" % e)

Parameters

Query parameters
Name Description
limit
Integer (int32)
default 100.
offset
Integer (int32)
start with 0; default 0.

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


Trade

getTrades

Get market trades.

Gets a list of historical trades. **Query Window:** Default query window is latest 7 days; The maximum start - end query window is 3 months. **Rate Limit:** 5 requests per IP per second.


/api/v1/trades

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/trades?address=&buyerOrderId=&end=&height=&limit=&offset="eAsset=&sellerOrderId=&side=&start=&symbol=&total="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TradeApi;

import java.io.File;
import java.util.*;

public class TradeApiExample {

    public static void main(String[] args) {
        
        TradeApi apiInstance = new TradeApi();
        String address = address_example; // String | the buyer/seller address
        String buyerOrderId = buyerOrderId_example; // String | buyer order id
        Long end = 789; // Long | end time in Milliseconds
        Long height = 789; // Long | block height
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        String quoteAsset = quoteAsset_example; // String | quote asset
        String sellerOrderId = sellerOrderId_example; // String | seller order id
        Integer side = 56; // Integer | order side. 1 for buy and 2 for sell.
        Long start = 789; // Long | start time in Milliseconds
        String symbol = symbol_example; // String | symbol
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            TradePage result = apiInstance.getTrades(address, buyerOrderId, end, height, limit, offset, quoteAsset, sellerOrderId, side, start, symbol, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TradeApi#getTrades");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TradeApi;

public class TradeApiExample {

    public static void main(String[] args) {
        TradeApi apiInstance = new TradeApi();
        String address = address_example; // String | the buyer/seller address
        String buyerOrderId = buyerOrderId_example; // String | buyer order id
        Long end = 789; // Long | end time in Milliseconds
        Long height = 789; // Long | block height
        Integer limit = 56; // Integer | default 500; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        String quoteAsset = quoteAsset_example; // String | quote asset
        String sellerOrderId = sellerOrderId_example; // String | seller order id
        Integer side = 56; // Integer | order side. 1 for buy and 2 for sell.
        Long start = 789; // Long | start time in Milliseconds
        String symbol = symbol_example; // String | symbol
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            TradePage result = apiInstance.getTrades(address, buyerOrderId, end, height, limit, offset, quoteAsset, sellerOrderId, side, start, symbol, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TradeApi#getTrades");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // the buyer/seller address (optional)
String *buyerOrderId = buyerOrderId_example; // buyer order id (optional)
Long *end = 789; // end time in Milliseconds (optional)
Long *height = 789; // block height (optional)
Integer *limit = 56; // default 500; max 1000. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)
String *quoteAsset = quoteAsset_example; // quote asset (optional)
String *sellerOrderId = sellerOrderId_example; // seller order id (optional)
Integer *side = 56; // order side. 1 for buy and 2 for sell. (optional)
Long *start = 789; // start time in Milliseconds (optional)
String *symbol = symbol_example; // symbol (optional)
Integer *total = 56; // total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

TradeApi *apiInstance = [[TradeApi alloc] init];

// Get market trades.
[apiInstance getTradesWith:address
    buyerOrderId:buyerOrderId
    end:end
    height:height
    limit:limit
    offset:offset
    quoteAsset:quoteAsset
    sellerOrderId:sellerOrderId
    side:side
    start:start
    symbol:symbol
    total:total
              completionHandler: ^(TradePage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TradeApi()
var opts = { 
  'address': address_example, // {{String}} the buyer/seller address
  'buyerOrderId': buyerOrderId_example, // {{String}} buyer order id
  'end': 789, // {{Long}} end time in Milliseconds
  'height': 789, // {{Long}} block height
  'limit': 56, // {{Integer}} default 500; max 1000.
  'offset': 56, // {{Integer}} start with 0; default 0.
  'quoteAsset': quoteAsset_example, // {{String}} quote asset
  'sellerOrderId': sellerOrderId_example, // {{String}} seller order id
  'side': 56, // {{Integer}} order side. 1 for buy and 2 for sell.
  'start': 789, // {{Long}} start time in Milliseconds
  'symbol': symbol_example, // {{String}} symbol
  'total': 56 // {{Integer}} total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTrades(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTradesExample
    {
        public void main()
        {

            var apiInstance = new TradeApi();
            var address = address_example;  // String | the buyer/seller address (optional) 
            var buyerOrderId = buyerOrderId_example;  // String | buyer order id (optional) 
            var end = 789;  // Long | end time in Milliseconds (optional) 
            var height = 789;  // Long | block height (optional) 
            var limit = 56;  // Integer | default 500; max 1000. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 
            var quoteAsset = quoteAsset_example;  // String | quote asset (optional) 
            var sellerOrderId = sellerOrderId_example;  // String | seller order id (optional) 
            var side = 56;  // Integer | order side. 1 for buy and 2 for sell. (optional) 
            var start = 789;  // Long | start time in Milliseconds (optional) 
            var symbol = symbol_example;  // String | symbol (optional) 
            var total = 56;  // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional) 

            try
            {
                // Get market trades.
                TradePage result = apiInstance.getTrades(address, buyerOrderId, end, height, limit, offset, quoteAsset, sellerOrderId, side, start, symbol, total);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TradeApi.getTrades: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTradeApi();
$address = address_example; // String | the buyer/seller address
$buyerOrderId = buyerOrderId_example; // String | buyer order id
$end = 789; // Long | end time in Milliseconds
$height = 789; // Long | block height
$limit = 56; // Integer | default 500; max 1000.
$offset = 56; // Integer | start with 0; default 0.
$quoteAsset = quoteAsset_example; // String | quote asset
$sellerOrderId = sellerOrderId_example; // String | seller order id
$side = 56; // Integer | order side. 1 for buy and 2 for sell.
$start = 789; // Long | start time in Milliseconds
$symbol = symbol_example; // String | symbol
$total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

try {
    $result = $api_instance->getTrades($address, $buyerOrderId, $end, $height, $limit, $offset, $quoteAsset, $sellerOrderId, $side, $start, $symbol, $total);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TradeApi->getTrades: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TradeApi;

my $api_instance = WWW::SwaggerClient::TradeApi->new();
my $address = address_example; # String | the buyer/seller address
my $buyerOrderId = buyerOrderId_example; # String | buyer order id
my $end = 789; # Long | end time in Milliseconds
my $height = 789; # Long | block height
my $limit = 56; # Integer | default 500; max 1000.
my $offset = 56; # Integer | start with 0; default 0.
my $quoteAsset = quoteAsset_example; # String | quote asset
my $sellerOrderId = sellerOrderId_example; # String | seller order id
my $side = 56; # Integer | order side. 1 for buy and 2 for sell.
my $start = 789; # Long | start time in Milliseconds
my $symbol = symbol_example; # String | symbol
my $total = 56; # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

eval { 
    my $result = $api_instance->getTrades(address => $address, buyerOrderId => $buyerOrderId, end => $end, height => $height, limit => $limit, offset => $offset, quoteAsset => $quoteAsset, sellerOrderId => $sellerOrderId, side => $side, start => $start, symbol => $symbol, total => $total);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TradeApi->getTrades: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TradeApi()
address = address_example # String | the buyer/seller address (optional)
buyerOrderId = buyerOrderId_example # String | buyer order id (optional)
end = 789 # Long | end time in Milliseconds (optional)
height = 789 # Long | block height (optional)
limit = 56 # Integer | default 500; max 1000. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)
quoteAsset = quoteAsset_example # String | quote asset (optional)
sellerOrderId = sellerOrderId_example # String | seller order id (optional)
side = 56 # Integer | order side. 1 for buy and 2 for sell. (optional)
start = 789 # Long | start time in Milliseconds (optional)
symbol = symbol_example # String | symbol (optional)
total = 56 # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

try: 
    # Get market trades.
    api_response = api_instance.get_trades(address=address, buyerOrderId=buyerOrderId, end=end, height=height, limit=limit, offset=offset, quoteAsset=quoteAsset, sellerOrderId=sellerOrderId, side=side, start=start, symbol=symbol, total=total)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TradeApi->getTrades: %s\n" % e)

Parameters

Query parameters
Name Description
address
String
the buyer/seller address
buyerOrderId
String
buyer order id
end
Long (int64)
end time in Milliseconds
height
Long (int64)
block height
limit
Integer (int32)
default 500; max 1000.
offset
Integer (int32)
start with 0; default 0.
quoteAsset
String
quote asset
sellerOrderId
String
seller order id
side
Integer (int32)
order side. 1 for buy and 2 for sell.
start
Long (int64)
start time in Milliseconds
symbol
String
symbol
total
Integer (int32)
total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


TradingFee

getBlockExchangeFee

Trading fee of the address grouped by block

Get historical trading fees of the address, including fees of trade/canceled order/expired order. Transfer and other transaction fees are not included. Order by block height DESC. **Query Window:** Default query window is latest 7 days; The maximum start - end query window is 3 months. **Rate Limit:** 5 requests per IP per second.


/api/v1/block-exchange-fee

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/block-exchange-fee?address=&end=&limit=&offset=&start=&total="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TradingFeeApi;

import java.io.File;
import java.util.*;

public class TradingFeeApiExample {

    public static void main(String[] args) {
        
        TradingFeeApi apiInstance = new TradingFeeApi();
        String address = address_example; // String | the seller/buyer address
        Long end = 789; // Long | end time
        Integer limit = 56; // Integer | default 50; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        Long start = 789; // Long | start time
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            BlockExchangeFeePage result = apiInstance.getBlockExchangeFee(address, end, limit, offset, start, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TradingFeeApi#getBlockExchangeFee");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TradingFeeApi;

public class TradingFeeApiExample {

    public static void main(String[] args) {
        TradingFeeApi apiInstance = new TradingFeeApi();
        String address = address_example; // String | the seller/buyer address
        Long end = 789; // Long | end time
        Integer limit = 56; // Integer | default 50; max 1000.
        Integer offset = 56; // Integer | start with 0; default 0.
        Long start = 789; // Long | start time
        Integer total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
        try {
            BlockExchangeFeePage result = apiInstance.getBlockExchangeFee(address, end, limit, offset, start, total);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TradingFeeApi#getBlockExchangeFee");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // the seller/buyer address (optional)
Long *end = 789; // end time (optional)
Integer *limit = 56; // default 50; max 1000. (optional)
Integer *offset = 56; // start with 0; default 0. (optional)
Long *start = 789; // start time (optional)
Integer *total = 56; // total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

TradingFeeApi *apiInstance = [[TradingFeeApi alloc] init];

// Trading fee of the address grouped by block
[apiInstance getBlockExchangeFeeWith:address
    end:end
    limit:limit
    offset:offset
    start:start
    total:total
              completionHandler: ^(BlockExchangeFeePage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TradingFeeApi()
var opts = { 
  'address': address_example, // {{String}} the seller/buyer address
  'end': 789, // {{Long}} end time
  'limit': 56, // {{Integer}} default 50; max 1000.
  'offset': 56, // {{Integer}} start with 0; default 0.
  'start': 789, // {{Long}} start time
  'total': 56 // {{Integer}} total number required, 0 for not required and 1 for required; default not required, return total=-1 in response
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getBlockExchangeFee(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getBlockExchangeFeeExample
    {
        public void main()
        {

            var apiInstance = new TradingFeeApi();
            var address = address_example;  // String | the seller/buyer address (optional) 
            var end = 789;  // Long | end time (optional) 
            var limit = 56;  // Integer | default 50; max 1000. (optional) 
            var offset = 56;  // Integer | start with 0; default 0. (optional) 
            var start = 789;  // Long | start time (optional) 
            var total = 56;  // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional) 

            try
            {
                // Trading fee of the address grouped by block
                BlockExchangeFeePage result = apiInstance.getBlockExchangeFee(address, end, limit, offset, start, total);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TradingFeeApi.getBlockExchangeFee: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTradingFeeApi();
$address = address_example; // String | the seller/buyer address
$end = 789; // Long | end time
$limit = 56; // Integer | default 50; max 1000.
$offset = 56; // Integer | start with 0; default 0.
$start = 789; // Long | start time
$total = 56; // Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

try {
    $result = $api_instance->getBlockExchangeFee($address, $end, $limit, $offset, $start, $total);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TradingFeeApi->getBlockExchangeFee: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TradingFeeApi;

my $api_instance = WWW::SwaggerClient::TradingFeeApi->new();
my $address = address_example; # String | the seller/buyer address
my $end = 789; # Long | end time
my $limit = 56; # Integer | default 50; max 1000.
my $offset = 56; # Integer | start with 0; default 0.
my $start = 789; # Long | start time
my $total = 56; # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

eval { 
    my $result = $api_instance->getBlockExchangeFee(address => $address, end => $end, limit => $limit, offset => $offset, start => $start, total => $total);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TradingFeeApi->getBlockExchangeFee: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TradingFeeApi()
address = address_example # String | the seller/buyer address (optional)
end = 789 # Long | end time (optional)
limit = 56 # Integer | default 50; max 1000. (optional)
offset = 56 # Integer | start with 0; default 0. (optional)
start = 789 # Long | start time (optional)
total = 56 # Integer | total number required, 0 for not required and 1 for required; default not required, return total=-1 in response (optional)

try: 
    # Trading fee of the address grouped by block
    api_response = api_instance.get_block_exchange_fee(address=address, end=end, limit=limit, offset=offset, start=start, total=total)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TradingFeeApi->getBlockExchangeFee: %s\n" % e)

Parameters

Query parameters
Name Description
address
String
the seller/buyer address
end
Long (int64)
end time
limit
Integer (int32)
default 50; max 1000.
offset
Integer (int32)
start with 0; default 0.
start
Long (int64)
start time
total
Integer (int32)
total number required, 0 for not required and 1 for required; default not required, return total=-1 in response

Responses

Status: 200 - OK


Transaction

getTransactionsInBlockV2

transactions in Block

Get transactions in the block. Multi-send and multi-coin transactions are included as sub-transactions. **Rate Limit:** 5 request per IP per second.


/api/v2/transactions-in-block/{blockHeight}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v2/transactions-in-block/{blockHeight}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TransactionApi;

import java.io.File;
import java.util.*;

public class TransactionApiExample {

    public static void main(String[] args) {
        
        TransactionApi apiInstance = new TransactionApi();
        Long blockHeight = 789; // Long | blockHeight
        try {
            BlockTxV2 result = apiInstance.getTransactionsInBlockV2(blockHeight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionApi#getTransactionsInBlockV2");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TransactionApi;

public class TransactionApiExample {

    public static void main(String[] args) {
        TransactionApi apiInstance = new TransactionApi();
        Long blockHeight = 789; // Long | blockHeight
        try {
            BlockTxV2 result = apiInstance.getTransactionsInBlockV2(blockHeight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionApi#getTransactionsInBlockV2");
            e.printStackTrace();
        }
    }
}
Long *blockHeight = 789; // blockHeight

TransactionApi *apiInstance = [[TransactionApi alloc] init];

// transactions in Block
[apiInstance getTransactionsInBlockV2With:blockHeight
              completionHandler: ^(BlockTxV2 output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TransactionApi()
var blockHeight = 789; // {{Long}} blockHeight

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTransactionsInBlockV2(blockHeight, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTransactionsInBlockV2Example
    {
        public void main()
        {

            var apiInstance = new TransactionApi();
            var blockHeight = 789;  // Long | blockHeight

            try
            {
                // transactions in Block
                BlockTxV2 result = apiInstance.getTransactionsInBlockV2(blockHeight);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TransactionApi.getTransactionsInBlockV2: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTransactionApi();
$blockHeight = 789; // Long | blockHeight

try {
    $result = $api_instance->getTransactionsInBlockV2($blockHeight);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionApi->getTransactionsInBlockV2: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TransactionApi;

my $api_instance = WWW::SwaggerClient::TransactionApi->new();
my $blockHeight = 789; # Long | blockHeight

eval { 
    my $result = $api_instance->getTransactionsInBlockV2(blockHeight => $blockHeight);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TransactionApi->getTransactionsInBlockV2: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TransactionApi()
blockHeight = 789 # Long | blockHeight

try: 
    # transactions in Block
    api_response = api_instance.get_transactions_in_block_v2(blockHeight)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TransactionApi->getTransactionsInBlockV2: %s\n" % e)

Parameters

Path parameters
Name Description
blockHeight*
Long (int64)
blockHeight
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request. The block to query is higher than current highest bloc.

Status: 404 - Not Found


txns

Get transactions.

Gets a list of transactions. Multisend transaction is not available in this API. Currently 'confirmBlocks' and 'txAge' are not supported. **Query Window:** Default query window is latest 24 hours; The maximum start - end query window is 3 months. **Rate Limit:** 60 requests per IP per minute.


/api/v1/transactions

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/transactions?address=&blockHeight=&endTime=&limit=&offset=&side=&startTime=&txAsset=&txType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TransactionApi;

import java.io.File;
import java.util.*;

public class TransactionApiExample {

    public static void main(String[] args) {
        
        TransactionApi apiInstance = new TransactionApi();
        String address = address_example; // String | address
        Long blockHeight = 789; // Long | blockHeight
        Long endTime = 789; // Long | endTime in Milliseconds
        Integer limit = 56; // Integer | limit
        Integer offset = 56; // Integer | offset
        String side = side_example; // String | transaction side. Allowed value: [ RECEIVE, SEND]
        Long startTime = 789; // Long | start time in Milliseconds
        String txAsset = txAsset_example; // String | txAsset
        String txType = txType_example; // String | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL]
        try {
            TxPage result = apiInstance.txns(address, blockHeight, endTime, limit, offset, side, startTime, txAsset, txType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionApi#txns");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TransactionApi;

public class TransactionApiExample {

    public static void main(String[] args) {
        TransactionApi apiInstance = new TransactionApi();
        String address = address_example; // String | address
        Long blockHeight = 789; // Long | blockHeight
        Long endTime = 789; // Long | endTime in Milliseconds
        Integer limit = 56; // Integer | limit
        Integer offset = 56; // Integer | offset
        String side = side_example; // String | transaction side. Allowed value: [ RECEIVE, SEND]
        Long startTime = 789; // Long | start time in Milliseconds
        String txAsset = txAsset_example; // String | txAsset
        String txType = txType_example; // String | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL]
        try {
            TxPage result = apiInstance.txns(address, blockHeight, endTime, limit, offset, side, startTime, txAsset, txType);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionApi#txns");
            e.printStackTrace();
        }
    }
}
String *address = address_example; // address
Long *blockHeight = 789; // blockHeight (optional)
Long *endTime = 789; // endTime in Milliseconds (optional)
Integer *limit = 56; // limit (optional)
Integer *offset = 56; // offset (optional)
String *side = side_example; // transaction side. Allowed value: [ RECEIVE, SEND] (optional)
Long *startTime = 789; // start time in Milliseconds (optional)
String *txAsset = txAsset_example; // txAsset (optional)
String *txType = txType_example; // transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] (optional)

TransactionApi *apiInstance = [[TransactionApi alloc] init];

// Get transactions.
[apiInstance txnsWith:address
    blockHeight:blockHeight
    endTime:endTime
    limit:limit
    offset:offset
    side:side
    startTime:startTime
    txAsset:txAsset
    txType:txType
              completionHandler: ^(TxPage output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TransactionApi()
var address = address_example; // {{String}} address
var opts = { 
  'blockHeight': 789, // {{Long}} blockHeight
  'endTime': 789, // {{Long}} endTime in Milliseconds
  'limit': 56, // {{Integer}} limit
  'offset': 56, // {{Integer}} offset
  'side': side_example, // {{String}} transaction side. Allowed value: [ RECEIVE, SEND]
  'startTime': 789, // {{Long}} start time in Milliseconds
  'txAsset': txAsset_example, // {{String}} txAsset
  'txType': txType_example // {{String}} transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL]
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.txns(address, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class txnsExample
    {
        public void main()
        {

            var apiInstance = new TransactionApi();
            var address = address_example;  // String | address
            var blockHeight = 789;  // Long | blockHeight (optional) 
            var endTime = 789;  // Long | endTime in Milliseconds (optional) 
            var limit = 56;  // Integer | limit (optional) 
            var offset = 56;  // Integer | offset (optional) 
            var side = side_example;  // String | transaction side. Allowed value: [ RECEIVE, SEND] (optional) 
            var startTime = 789;  // Long | start time in Milliseconds (optional) 
            var txAsset = txAsset_example;  // String | txAsset (optional) 
            var txType = txType_example;  // String | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] (optional) 

            try
            {
                // Get transactions.
                TxPage result = apiInstance.txns(address, blockHeight, endTime, limit, offset, side, startTime, txAsset, txType);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TransactionApi.txns: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTransactionApi();
$address = address_example; // String | address
$blockHeight = 789; // Long | blockHeight
$endTime = 789; // Long | endTime in Milliseconds
$limit = 56; // Integer | limit
$offset = 56; // Integer | offset
$side = side_example; // String | transaction side. Allowed value: [ RECEIVE, SEND]
$startTime = 789; // Long | start time in Milliseconds
$txAsset = txAsset_example; // String | txAsset
$txType = txType_example; // String | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL]

try {
    $result = $api_instance->txns($address, $blockHeight, $endTime, $limit, $offset, $side, $startTime, $txAsset, $txType);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionApi->txns: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TransactionApi;

my $api_instance = WWW::SwaggerClient::TransactionApi->new();
my $address = address_example; # String | address
my $blockHeight = 789; # Long | blockHeight
my $endTime = 789; # Long | endTime in Milliseconds
my $limit = 56; # Integer | limit
my $offset = 56; # Integer | offset
my $side = side_example; # String | transaction side. Allowed value: [ RECEIVE, SEND]
my $startTime = 789; # Long | start time in Milliseconds
my $txAsset = txAsset_example; # String | txAsset
my $txType = txType_example; # String | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL]

eval { 
    my $result = $api_instance->txns(address => $address, blockHeight => $blockHeight, endTime => $endTime, limit => $limit, offset => $offset, side => $side, startTime => $startTime, txAsset => $txAsset, txType => $txType);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TransactionApi->txns: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TransactionApi()
address = address_example # String | address
blockHeight = 789 # Long | blockHeight (optional)
endTime = 789 # Long | endTime in Milliseconds (optional)
limit = 56 # Integer | limit (optional)
offset = 56 # Integer | offset (optional)
side = side_example # String | transaction side. Allowed value: [ RECEIVE, SEND] (optional)
startTime = 789 # Long | start time in Milliseconds (optional)
txAsset = txAsset_example # String | txAsset (optional)
txType = txType_example # String | transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL] (optional)

try: 
    # Get transactions.
    api_response = api_instance.txns(address, blockHeight=blockHeight, endTime=endTime, limit=limit, offset=offset, side=side, startTime=startTime, txAsset=txAsset, txType=txType)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TransactionApi->txns: %s\n" % e)

Parameters

Query parameters
Name Description
address*
String
address
Required
blockHeight
Long (int64)
blockHeight
endTime
Long (int64)
endTime in Milliseconds
limit
Integer (int32)
limit
offset
Integer (int32)
offset
side
String
transaction side. Allowed value: [ RECEIVE, SEND]
startTime
Long (int64)
start time in Milliseconds
txAsset
String
txAsset
txType
String
transaction type. Allowed value: [ NEW_ORDER,ISSUE_TOKEN,BURN_TOKEN,LIST_TOKEN,CANCEL_ORDER,FREEZE_TOKEN,UN_FREEZE_TOKEN,TRANSFER,PROPOSAL,VOTE,MINT,DEPOSIT,CREATE_VALIDATOR,REMOVE_VALIDATOR,TIME_LOCK,TIME_UNLOCK,TIME_RELOCK,SET_ACCOUNT_FLAG,HTL_TRANSFER,CLAIM_HTL,DEPOSIT_HTL,REFUND_HTL]

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 404 - Not Found

Status: default - Generic error response


TransactionInBlock

getTransactionsInBlock

Get transactions in the specific block.

Get transactions in the block. Multi-send and multi-coin transactions are flattened as transactions. This API is deprecated. **Rate Limit:** 5 requests per IP per second. **Rate Limit:** 60 requests per IP per minute.


/api/v1/transactions-in-block/{blockHeight}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/transactions-in-block/{blockHeight}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TransactionInBlockApi;

import java.io.File;
import java.util.*;

public class TransactionInBlockApiExample {

    public static void main(String[] args) {
        
        TransactionInBlockApi apiInstance = new TransactionInBlockApi();
        String blockHeight = blockHeight_example; // String | block height
        try {
            BlockTx result = apiInstance.getTransactionsInBlock(blockHeight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionInBlockApi#getTransactionsInBlock");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TransactionInBlockApi;

public class TransactionInBlockApiExample {

    public static void main(String[] args) {
        TransactionInBlockApi apiInstance = new TransactionInBlockApi();
        String blockHeight = blockHeight_example; // String | block height
        try {
            BlockTx result = apiInstance.getTransactionsInBlock(blockHeight);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TransactionInBlockApi#getTransactionsInBlock");
            e.printStackTrace();
        }
    }
}
String *blockHeight = blockHeight_example; // block height

TransactionInBlockApi *apiInstance = [[TransactionInBlockApi alloc] init];

// Get transactions in the specific block.
[apiInstance getTransactionsInBlockWith:blockHeight
              completionHandler: ^(BlockTx output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TransactionInBlockApi()
var blockHeight = blockHeight_example; // {{String}} block height

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTransactionsInBlock(blockHeight, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTransactionsInBlockExample
    {
        public void main()
        {

            var apiInstance = new TransactionInBlockApi();
            var blockHeight = blockHeight_example;  // String | block height

            try
            {
                // Get transactions in the specific block.
                BlockTx result = apiInstance.getTransactionsInBlock(blockHeight);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TransactionInBlockApi.getTransactionsInBlock: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTransactionInBlockApi();
$blockHeight = blockHeight_example; // String | block height

try {
    $result = $api_instance->getTransactionsInBlock($blockHeight);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TransactionInBlockApi->getTransactionsInBlock: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TransactionInBlockApi;

my $api_instance = WWW::SwaggerClient::TransactionInBlockApi->new();
my $blockHeight = blockHeight_example; # String | block height

eval { 
    my $result = $api_instance->getTransactionsInBlock(blockHeight => $blockHeight);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TransactionInBlockApi->getTransactionsInBlock: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TransactionInBlockApi()
blockHeight = blockHeight_example # String | block height

try: 
    # Get transactions in the specific block.
    api_response = api_instance.get_transactions_in_block(blockHeight)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TransactionInBlockApi->getTransactionsInBlock: %s\n" % e)

Parameters

Path parameters
Name Description
blockHeight*
String
block height
Required

Responses

Status: 200 - OK

Status: 400 - Bad Request. The block to query is higher than current highest block.

Status: 404 - Not Found

Status: default - Generic error response


Tx

getTransaction

Get a transaction.

Gets transaction metadata by transaction ID. By default, transactions are returned in a raw format. You may add `?format=json` to the end of the path to obtain a more readable response. **Destination:** Seed node. **Rate Limit:** 10 requests per IP per second. **Example:** Below is an example response of a send transaction when `?format=json` is used. ``` { code:0, hash:"433806D6A4AB6359CB56EC55BA99896DFAB2AF11326B74881A2ABA7049C492D3", height:"7850389", log:"Msg 0: ", ok:true, tx:{ type:"auth/StdTx", value:{ data:null, memo:"101192150", msg:[ { type:"cosmos-sdk/Send", value:{ inputs:[ { address:"bnb1jafs33u9u6f7w7wzfmm4rr9rzy2cgqzp78kwaw", coins:[ { amount:"496429373", denom:"BNB", } ], } ], outputs:[ { address:"bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23", coins:[ { amount:"496429373", denom:"BNB", } ], } ], }, } ], signatures:[ { account_number:"438", pub_key:{ type:"tendermint/PubKeySecp256k1", value:"A3mfgg/i12XNyy9esqCjI7yrkrOs9dngP7c9cDUEJly5", }, sequence:"0", signature:"VvvGz3qbyirJ7vv01Df8tuAd7K4I+HK+yEBfep+qwtMKuHWQQH3XtMB9Pqtc2jlia0AtDe+BUEMtIyh3/N66IQ==", } ], source:"1", }, }, } ```


/api/v1/tx/{hash}

Usage and SDK Samples

curl -X GET "https://dex.binance.org/api/v1/tx/{hash}?format="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TxApi;

import java.io.File;
import java.util.*;

public class TxApiExample {

    public static void main(String[] args) {
        
        TxApi apiInstance = new TxApi();
        String hash = hash_example; // String | The transaction hash to query
        String format = format_example; // String | Response format (`json` or amino)
        try {
            Transaction result = apiInstance.getTransaction(hash, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TxApi#getTransaction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TxApi;

public class TxApiExample {

    public static void main(String[] args) {
        TxApi apiInstance = new TxApi();
        String hash = hash_example; // String | The transaction hash to query
        String format = format_example; // String | Response format (`json` or amino)
        try {
            Transaction result = apiInstance.getTransaction(hash, format);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TxApi#getTransaction");
            e.printStackTrace();
        }
    }
}
String *hash = hash_example; // The transaction hash to query
String *format = format_example; // Response format (`json` or amino) (optional)

TxApi *apiInstance = [[TxApi alloc] init];

// Get a transaction.
[apiInstance getTransactionWith:hash
    format:format
              completionHandler: ^(Transaction output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var HttpApi = require('http_api');

var api = new HttpApi.TxApi()
var hash = hash_example; // {{String}} The transaction hash to query
var opts = { 
  'format': format_example // {{String}} Response format (`json` or amino)
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTransaction(hash, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTransactionExample
    {
        public void main()
        {

            var apiInstance = new TxApi();
            var hash = hash_example;  // String | The transaction hash to query
            var format = format_example;  // String | Response format (`json` or amino) (optional) 

            try
            {
                // Get a transaction.
                Transaction result = apiInstance.getTransaction(hash, format);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TxApi.getTransaction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiTxApi();
$hash = hash_example; // String | The transaction hash to query
$format = format_example; // String | Response format (`json` or amino)

try {
    $result = $api_instance->getTransaction($hash, $format);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TxApi->getTransaction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TxApi;

my $api_instance = WWW::SwaggerClient::TxApi->new();
my $hash = hash_example; # String | The transaction hash to query
my $format = format_example; # String | Response format (`json` or amino)

eval { 
    my $result = $api_instance->getTransaction(hash => $hash, format => $format);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TxApi->getTransaction: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TxApi()
hash = hash_example # String | The transaction hash to query
format = format_example # String | Response format (`json` or amino) (optional)

try: 
    # Get a transaction.
    api_response = api_instance.get_transaction(hash, format=format)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TxApi->getTransaction: %s\n" % e)

Parameters

Path parameters
Name Description
hash*
String
The transaction hash to query
Required
Query parameters
Name Description
format
String
Response format (`json` or amino)

Responses

Status: 200 - Success

Status: 404 - Not Found

Status: 500 - Bad Request

Status: default - Generic error response