Top 10 Trade Partners

Retrieve the top 10 trade partners by value for a selected country, HS code, trade flow, and period.
ENDPOINTS
POST /api/v1/tradeAnalytics/top10Partner

Request parameters

countryCode

string

Country ISO3 code

  • Required: Yes
  • Example: USA

ie

string

Trade flow. Use i for import and e for export.

  • Required: No
  • Example: i

hsCode

string

HS code

  • Required: No
  • Example: 28

startDate

string

Start period in YYYY-MM format

  • Required: Yes
  • Example: 2024-01

endDate

string

End period in YYYY-MM format

  • Required: Yes
  • Example: 2024-12
Request Example
{
    "countryCode": "USA",
    "ie": "i",
    "hsCode": "28",
    "startDate": "2024-01",
    "endDate": "2024-12"
}
curl https://api.tradedata.io/api/v1/tradeAnalytics/top10Partner \
  -H "Authorization: Bearer yourTokenHere" \
  -H "Content-Type: application/json" \
  -d '{"countryCode": "USA", "ie": "i", "hsCode": "28", "startDate": "2024-01", "endDate": "2024-12"}'

Response parameters

code

int

Status code

  • Example: 200

data

array

Result container

data.countryName

string

Partner country name

  • Example: China

data.iso3

string

Partner country ISO3 code

  • Example: CHN

data.value

number

Trade value

  • Example: 2203563727

data.percent

number

Share

  • Example: 10.25
Response Example
{
    "code": 200,
    "success": true,
    "data": [
        {
            "countryName": "China",
            "iso3": "CHN",
            "value": 2203563727,
            "percent": 10.25
        }
    ],
    "msg": "success",
    "total": 0,
    "pageSize": 0,
    "current": 0,
    "sumResult": null
}