Skip to main content

API for PerfectMoney service

Project description

PerfectMoney API

Perfect Money is a financial service allowing the users to make instant payments. This package is inspired by official API documentations and contains all functions for interacting with PerfectMoney's API as mentioned in documentations.

Installation

Use the package manager pip to install package:

# Latest version
pip install perfectmoney

# Latest changes 
pip install git+https://github.com/quitegreensky/perfectmoney.git

Usage Examples

Here are some examples:

from perfectmoney import PerfectMoney
p= PerfectMoney('login_id', 'password') 
#============
# get balance
#============
balance= p.balance()
if not balance:
    print(p.error)
else:
    print(balance)
#returns a dictionary of addresses
#{
#    'USD': [{'U12345': '100.00'}], 
#    'EUR': [{'E12345': '50.00'}], 
#    'GOLD': [{'G12345': '35.00'}, {'G123456785': '0.00'}], 
#    'BTC': [{'B123456785': '0.00'}]
#}

#============
# send money
#============
send= p.spend(payer_account='U123456', Payee_Account='U654321', amount=100)
if not send:
    print(p.error)
else:
    print(send)
# returns 
#{
#    'Payee_Account_Name': 'someaccount', 
#    'Payee_Account': 'U654321', 
#    'Payer_Account': 'U123456', 
#    'PAYMENT_AMOUNT': '1.4', 
#    'PAYMENT_BATCH_NUM': '1234567', 
#    'PAYMENT_ID': ''
#}

#============
# rates
#============
rate = p.rates(currency='EUR')
if not rate :
    print(p.error)
else :
    print(rate)
# returns
#{
#    'time': '8/12/20 4:23:34 AM', 
#    'USD': ' 1.17 ', 
#    'GOLD': ' 0.0006227 ', 
#    'BTC': ' 0.0001045 '
#}

Contributing

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perfectmoney-2.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perfectmoney-2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file perfectmoney-2.1.tar.gz.

File metadata

  • Download URL: perfectmoney-2.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for perfectmoney-2.1.tar.gz
Algorithm Hash digest
SHA256 b4c8f1249be3ddb5ba52ffbb7ff0df04703e9efa727e40a4fa03d8d293ffc98c
MD5 1c7be8f22b54e9d750a7f3872c4eb76c
BLAKE2b-256 45cfaf0686c70b0c001f4728007fd4238f9d9d525758d88fe9d65b0130e79566

See more details on using hashes here.

File details

Details for the file perfectmoney-2.1-py3-none-any.whl.

File metadata

  • Download URL: perfectmoney-2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for perfectmoney-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 331804ca69595d93293eaa8ca81db04654e0d2250a2a0c2340b199b5b853fa7a
MD5 f78f831b93ab4c0b27720835101d18f7
BLAKE2b-256 7b994abc3d47b6d8d101b3ee0e9a5ebff8f974a9bb68936e13d792bc759149ee

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page