Company Trade Trend API

Retrieve monthly aggregated trade statistics (amount, count, weight) for a company.
ENDPOINTS
POST /api/v1/company/companyTrend

Request parameters

com_role

integer

Company role in trade. 1 = buyer, 2 = supplier.

  • Required: Yes
  • Example: 2

com_id

string

Company ID.

  • Required: Yes
  • Example: 1ad397fa1acc309dae3dc54e4a963d4c

date

array<integer>

Date range. Two-element array of 8-digit integers [YYYYMMDD, YYYYMMDD].

  • Required: Yes
  • Example: [20230101, 20251215]

page

integer

Page number. Default: 1, max: 1000.

  • Required: No
  • Example: 1

page_size

integer

Records per page. Default: 10, max: 50.

  • Required: No
  • Example: 10
Request Example
{
    "com_role": "2",
    "com_id": "1ad397fa1acc309dae3dc54e4a963d4c",
    "date": [
        20230101,
        20251215
    ],
    "page": 1,
    "page_size": 10
}
curl https://api.tradedata.io/api/v1/company/companyTrend \
  -H "Authorization: Bearer yourTokenHere" \
  -H "Content-Type: application/json" \
  -d '{"com_role": "2", "com_id": "1ad397fa1acc309dae3dc54e4a963d4c", "date": [20230101, 20251215], "page": 1, "page_size": 10}'

Response parameters

data

array

Monthly trend data.

data.val

string

Month timestamp (ISO 8601).

  • Example: 2023-01-01T00:00:00Z

data.amount

string

Total trade amount (USD).

  • Example: 19831604.32421875

data.count

string

Number of transactions.

  • Example: 47

data.weight

string

Total weight (kg).

  • Example: 0.0

pageSize

integer

Number of months returned per page.

  • Example: 10
Response Example
{
    "code": 200,
    "success": true,
    "data": [
        {
            "val": "2023-01-01T00:00:00Z",
            "amount": "19831604.32421875",
            "count": "47",
            "weight": "0.0"
        }
    ],
    "msg": "OK",
    "total": 0,
    "pageSize": 10,
    "current": 1,
    "sumResult": {}
}