Latest Country Import/Export Statistics

Retrieve the latest annual import and export statistics for a selected country and optional HS code.
ENDPOINTS
POST /api/v1/tradeAnalytics/latestCountryStat

Request parameters

countryCode

string

Country ISO3 code

  • Required: Yes
  • Example: CHN

hsCode

string

HS code

  • Required: No
  • Example: 02
Request Example
{
    "countryCode": "USA",
    "hsCode": "28"
}
curl https://api.tradedata.io/api/v1/tradeAnalytics/latestCountryStat \
  -H "Authorization: Bearer yourTokenHere" \
  -H "Content-Type: application/json" \
  -d '{"countryCode": "USA", "hsCode": "28"}'

Response parameters

code

int

Status code

  • Example: 200

data

object

Result container

data.countryName

string

Country name

  • Example: China

data.year

int

Year

  • Example: 2022

data.yearlyBalance

number

Annual trade balance

  • Example: 2203563727

data.import

object

Import statistics

data.import.value

number

Import value

  • Example: 2715997517261

data.import.yoy

number

Year-over-year change of import value

  • Example: 7.08

data.export

object

Export statistics

data.export.value

number

Export value

  • Example: 3593601435602

data.export.yoy

number

Year-over-year change of export value

  • Example: 83.55
Response Example
{
    "code": 200,
    "success": true,
    "data": {
        "countryName": "China",
        "year": 2022,
        "yearlyBalance": 2203563727,
        "import": {
            "value": 2715997517261,
            "yoy": 7.08
        },
        "export": {
            "value": 3593601435602,
            "yoy": 83.55
        }
    },
    "msg": "OK",
    "total": 0,
    "pageSize": 0,
    "current": 0,
    "sumResult": null
}