5. Query your coins

1 Function description

Call the interface to obtain the remaining coins value of the your account. Note that each call will consume 0.1 coins.

2 Request method

method:POST URL :{ApiUrl}/api/inf/get_coins

3 Request parameter

nametypedescribesample

openId

string

your openId

apiKey

string

our apiKey

params = {'openId':OpenId, 'apiKey':ApiKey}
session = requests.session()
ret = requests.post(f"{ApiUrl}/api/inf/get_coins", data=json.dumps(params))
if ret.status_code==200:
    print(ret.json())
    if 'data' in ret.json():
        """
            [Success] An example returns the result
            { "code": 200,  "msg": "ok",  "data": 0.3}
        """
        """
            [Success] An example returns the result
            { "code": 500, "msg": "no coins!"}
        """            
        print('successfully!')

4 Respond

  • success

{ "code": 200,  "msg": "ok",  "data": 0.3}
  • failed

{ "code": 500, "msg": "no coins!"}

Last updated