Skip to main content

Python package to interact with TreasuryQuants.com APIs

Project description


Python APIs

This is a set of examples in Python showing how to use our APIs. It covers all that we offer.

Before you start, the most important step is to ensure that you have an account. This is where most people get into issues. Contrary to most websites, you create your account using the API themselves. So all you need to open your account are these APIs, themselves. Just head straight to TQ_example_account_create_account.py to open your new account.

1. Open Your New Account

Once you opened your account you would have ample free credit in your account to get up the curve. Free top-ups will continue periodically to ensure those with small and moderate use will be able to use our services for free.

2. Getting around the python files

Here is a list of what you will find and a brief explanation of what each file is about.

TQapis

Files Description
TQConnection.py This is the connection class that contains the HTTP protocol as well as the running account balance, etc..
TQRequests.py Contains all the functions that build the request parameters.
TQResponse.py The Response class that consumes the response store in XML

test

Files Description
TQUnitTest.py Contains Runner Class which can be used to perform unit testing.

python_examples

Files Description
TQ_example_account_create_apis.py Shows the apis necessary to develop the account life cycle.
TQ_example_describe.py Shows the way to list all our API functions and how to run them.
TQ_example_market_fx_rates.py Shows the steps of generating market spot FX and forward implied FX rates for a given date.
TQ_example_market_swap_rates.py Shows the steps of generating market implied swap rates for a given date.
TQ_example_market_price.py Shows the steps of pricing a save trade for a given date.
TQ_example_market_price_fx_forward.py Shows the steps of pricing an fx forward for a given date.
TQ_example_market_price_vanilla_swap.py Shows the steps of pricing a vanilla swap for a given date.
TQ_example_market_risk_ladder.py Shows the steps of calculating the ladder sensitivities of a saved trade for a given date.
TQ_example_market_pnl_predict.py Shows the steps of calculating the pnl predict of a saved trade between two dates.
TQ_example_market_pnl_attribute.py Shows the steps of calculating the pnl attribute of a saved trade between two dates.
TQ_example_show_available.py Shows list of all options available for each input data like business centers, day-count basis, etc.
TQ_example_workspace.py Shows list of all the saved file and delete the one you ask.

What can we do better?

Any comments, feedback, question? just drop us a line.

Email: contact@treasuryquants.com
Website: TreasuryQuants.com

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

TQapis-0.4.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

TQapis-0.4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file TQapis-0.4.tar.gz.

File metadata

  • Download URL: TQapis-0.4.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6

File hashes

Hashes for TQapis-0.4.tar.gz
Algorithm Hash digest
SHA256 ea244c1bb51017ae6127c6a270db140e23135e3c48aa02489f2c072d8ba90fa5
MD5 0ad66e22c3d6b246657dfbc286fc1523
BLAKE2b-256 ed600c39b078877cdf2b9e1b611f748b057441dd343358628f65e871a8b1e524

See more details on using hashes here.

File details

Details for the file TQapis-0.4-py3-none-any.whl.

File metadata

  • Download URL: TQapis-0.4-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.8.6

File hashes

Hashes for TQapis-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e04c76cf45fe55e300fec8d914c10ffc936c3248f9e454cfebfb304a53f73b1d
MD5 3a2dd875c119b6c007d655175609ff8c
BLAKE2b-256 09b2a9e79b144c94a3bfb746bba341e8053cc42ba75ba660434311d5b9bcd3d6

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