API Libraries

Client SDKs

Modern Treasury provides official libraries for our API that are maintained by Modern Treasury and the community.

🚧

API Coverage

The current version of our server-side libraries support only a portion of our API routes. The current coverage is for core Payments workflows. We are actively adding support for Ledgers and Compliance. If you have any issues or would like to request further support, please contact us.

NodeJS

Please find installation instructions and documentation for our Node library on GitHub: https://github.com/Modern-Treasury/modern-treasury-node

import ModernTreasury from 'modern-treasury';

const modernTreasury = new ModernTreasury({
  apiKey: 'my api key', // defaults to process.env["MODERN_TREASURY_API_KEY"]
  organizationId: 'my-organization-ID',
});

async function main() {
  const counterparty = await modernTreasury.counterparties.create({
    name: 'my first counterparty',
  });

  console.log(counterparty.id);
}
main().catch(console.error);

Python

Please find installation instructions and documentation for our Python library on GitHub: https://github.com/Modern-Treasury/modern-treasury-python

from modern_treasury import ModernTreasury

modern_treasury = ModernTreasury(
    # defaults to os.environ.get("MODERN_TREASURY_API_KEY")
    api_key="my api key",
    organization_id="my-organization-ID",
)

counterparty = modern_treasury.counterparties.create({
    "name": "my first counterparty",
})

print(counterparty.id)

📘

Looking for more languages?

Please contact us letting us know which language you would like us to support next.