AR.IO LogoAR.IO Documentation
TurboPayment Service

Pricing

Pricing and cost calculation endpoints

Get Amount of Credits in winc for Byte Count

Returns the current amount of winc it will cost to upload a given byte count worth of data items

GET
/price/bytes/{byteCount}

Path Parameters

byteCountinteger

A positive integer representing a byte count of data items

Match^[0-9]+$

Response Body

curl -X GET "https://loading/v1/price/bytes/5242880"
{
  "winc": "332824926",
  "adjustments": [
    {
      "name": "Adjustment",
      "description": "Some great subsidy",
      "operatorMagnitude": "0.6",
      "operator": "multiply",
      "adjustmentAmount": "-12300",
      "promoCode": "SOME-GREAT-CODE"
    }
  ]
}
"Invalid byte count"
"Pricing Oracle Unavailable"

Get winc for Payment Type and Amount

Returns the current amount of winc this service will quote for a given payment type and amount

GET
/price/{type}/{amount}

Path Parameters

typestring

Type for a given price request. Either "fiat" type or "token" type

amountinteger

Payment amount in a given currency's smallest unit value. For example, $10 USD is 1000. 1 AR is 1000000000000

Query Parameters

promoCode?string

Comma-separated list of promo codes

destinationAddress?string

Destination wallet address. This will override the signature header's public key if provided

Header Parameters

x-signature?string

The signature value derived from signing the request's data concatenated with the provided nonce using the private key from the provided public key

x-nonce?string

The nonce value concatenated with the request's data when deriving the provided the signature

x-public-key?string

The "modulus" of the JWK used to create the signature header

Response Body

curl -X GET "https://loading/v1/price/kyve/1000?promoCode=string&destinationAddress=string" \  -H "x-signature: string" \  -H "x-nonce: string" \  -H "x-public-key: string"
{
  "winc": "332824926",
  "adjustments": [
    {
      "name": "Adjustment",
      "description": "Some great subsidy",
      "operatorMagnitude": "0.6",
      "operator": "multiply",
      "adjustmentAmount": "-12300",
      "promoCode": "SOME-GREAT-CODE"
    }
  ],
  "fees": [
    {
      "name": "Adjustment",
      "description": "Some great subsidy",
      "operatorMagnitude": "0.6",
      "operator": "multiply",
      "adjustmentAmount": "-12300",
      "promoCode": "SOME-GREAT-CODE"
    }
  ],
  "actualPaymentAmount": 800,
  "quotedPaymentAmount": 1000
}
"Payment Amount is Invalid"
"Fiat Oracle Unavailable"

How is this guide?