Pix API Docs

Yagona API orqali barcha TON operatsiyalari

← Bosh sahifa

1. TON Top-up

Fragment Service
POST / GET https://api.pixy.uz/ton/buy

Telegram username orqali Telegram akkaunt TON balansni to'ldirish.

Request Parameters

Parameter Type Required Description
usernamestringYesTelegram user
amountfloatYesTON miqdori
seedstringYesYuboruvchi mnemonik frazasi (12/24 so'z)
order_idstringNoBuyurtma ID raqami

Example Request

curl -X POST "https://api.pixy.uz/ton/buy" \
-H "Content-Type: application/json" \
-d '{
  "username": "monk",
  "amount": 5,
  "seed": "apple banana cherry ...",
  "order_id": "ORD-123"
}'

Success Response

{
  "ok": true,
  "message": "Order successfully processed and TON topped up.",
  "order_id": "ORD-123",
  "username": "monk",
  "amount": 5,
  "cost": 5.1
}

Mumkin bo'lgan xatoliklar

VALIDATION_ERROR400

Ma'lumotlar to'liq emas yoki noto'g'ri.

INSUFFICIENT_FUNDS400

Mablag' yetarli emas.

WALLET_VM_ERROR400

Seed fraza xato.

FRAGMENT_API_ERROR400

Fragment API xatosi.

USER_TRANSFER_FAIL400

O'tkazma jarayonida xatolik.

FRAGMENT_TIMEOUT503

Javob berish vaqti tugadi.

CRITICAL_SERVER_ERROR500

Ichki server xatosi.

2. TON Transfer

Direct Wallet
POST / GET https://api.pixy.uz/ton/transfer

Hamyondan hamyonga to'g'ridan-to'g'ri TON o'tkazish.

Request Parameters

Parameter Type Required Description
tostringYesQabul qiluvchi hamyon (UQ/EQ..)
amountfloatYesO'tkazma miqdori
seedstringYesYuboruvchi mnemonik frazasi (12/24 so'z)
commentstringNoIzoh (Memo)
order_idstringNoBuyurtma ID raqami

Example Request

curl -X POST "https://api.pixy.uz/ton/transfer" \
-H "Content-Type: application/json" \
-d '{
  "order_id": "ORD-123",
  "to": "UQDa4Vz-0e...",
  "amount": "0.5",
  "seed": "apple banana cherry ...",
  "comment": "Xaridingiz uchun rahmat!",
}'

Success Response

{
  "ok": true,
  "message": "Transfer successful",
  "tx_hash": "b52d...8a1c",
  "fee": 0.005,
  "order_id": "ORD-123"
}

Mumkin bo'lgan xatoliklar

VALIDATION_ERROR400

Ma'lumotlar noto'g'ri (manzil, summa).

INSUFFICIENT_FUNDS400

Mablag' yetarli emas (Gas fee).

WALLET_VM_ERROR400

Seed fraza xato yoki hamyon yopiq.

USER_TRANSFER_FAIL400

O'tkazma kutilmagan xatolik tufayli to'xtadi.

CRITICAL_SERVER_ERROR500

Ichki server xatosi.