Calculate an order
Returns the order price before checkout, including discount, balance check, and warnings. Always call this before Create an order to surface validation issues without spending balance.
Endpoint:
Path parameters
Name | Type | Description |
|---|---|---|
apiKey* | String | Your personal API key. |
Request body
Name | Type | Description |
|---|---|---|
| string | Which proxy type to calculate for.
|
| number | Number of IP addresses to order. |
| number | Rental duration in days. Get valid values from Rent period. |
| string | ISO 3166-1 alpha-3 code (e.g. USA). Get valid values from Country. |
| string | Custom goal label for the order. |
| string | Discount promo code. Get valid values from Promo codes. |
Additional fields when proxyType=MOBILE
Name | Type | Description |
|---|---|---|
rotationTime* | number | Rotation interval in seconds. Get valid values from Mobile operator. |
mobileOperator* | string | Operator tag. Get valid values from Mobile operator. |
Examples
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
-H "Content-Type: application/json" \
-d '{
"proxyType": "IPv4",
"quantity": 5,
"rentPeriodDays": 30,
"country": "USA",
"goal": "scraping",
"promoCode": "SAVE10"
}'curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
-H "Content-Type: application/json" \
-d '{
"proxyType": "IPv6",
"quantity": 5,
"rentPeriodDays": 30,
"country": "USA",
"goal": "scraping",
"promoCode": "SAVE10"
}'# MOBILE — note the extra fields
curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
-H "Content-Type: application/json" \
-d '{
"proxyType": "MOBILE",
"quantity": 5,
"rentPeriodDays": 30,
"country": "USA",
"goal": "scraping",
"rotationTime": 300,
"mobileOperator": "verizon"
}'curl -X POST https://youproxy.io/client/api/v1/$KEY/calculate/order \
-H "Content-Type: application/json" \
-d '{
"proxyType": "ISP",
"quantity": 5,
"rentPeriodDays": 30,
"country": "USA",
"goal": "scraping",
"promoCode": "SAVE10"
}'Response
Response fields
Field | Type | Description |
|---|---|---|
| boolean |
|
| string | null | Echoes the requested type. |
| number | Account balance in |
| number | null | Calculated total. |
| string | ISO currency code (e.g. USD). |
| number | null | Discount percentage applied (e.g. 10 means 10%). |
| string | null |
|
| array | null | Non-blocking issues. If present, the order won't go through with current data — fix and retry. |
| object | null |
|