Solde du compte

Lire 1 minute

compte/solde

Paramètres :

  • token - autorisation (chaîne de caractères)
  • currency - devise selon la norme ISO 4217 (chaîne de caractères, par défaut : devise du compte). Valeurs :
    • rub - roubles
    • usd - dollars
    • kzt - tenge du Kazakhstan

Exemple d'appel de la méthode :

<?php
    $post = array(
        'token' => $token,
        'currency' => 'usd'
    );
    if ($curl = curl_init()) {
        curl_setopt($curl, CURLOPT_URL, 'https://www.ipweb.ru/api/v2/account/balance');
        curl_setopt($curl, CURLOPT_RETURNTRANSFER,true);
        curl_setopt($curl, CURLOPT_POST, true);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $post);
        $out = curl_exec($curl);
        echo $out;
        curl_close($curl);
    }

// Результат:

{
    "currency": "KZT",
    "balance": 509994.24
}
IPweb

Rate the material:

Rating: 0 out of 5. Total ratings: 0.
Dernière modification

Je ne comprends rien ! Aidez-moi :-(