Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OneFinance.js

Unofficial SDK for the One Finance bank API

let One = require("onefinance");

async function main() {
    let jwt = process.argv[2];

    await One.init(jwt);

    let pockets = await One.pockets();
    console.info(pockets);
}

main();

REST

List "Pockets" (Accounts) + Balances

GET https://api.one.app/banking/v2/pockets?user_id=${userId}
Authorization: Bearer ${siteJwt}
X-Safe-Request-ID: ${nonceUuid}

Internal Transfer

POST https://api.one.app/banking/command
Authorization: Bearer ${siteJwt}
X-Safe-Request-ID: ${nonceUuid}
Content-Type: application/json
{
    "command_name": "TRANSFER_FUNDS_OWNED_POCKET",
    "origin_pocket_id": `${origin.pocket_id}`,
    "destination_pocket_id": `${destination.pocket_id}`,
    "amount": 100.0
}

Transfer Out to Bank

POST https://api.one.app/banking/command
Authorization: Bearer ${siteJwt}
X-Safe-Request-ID: ${nonceUuid}
Content-Type: application/json
{
    "command_name": "DEBIT_POCKET_TO_LINKED_ACCOUNT",
    "pocket_id": `${origin.pocket_id}`,
    "linked_account_id": `${destination.linked_account_id}`,
    "amount": 100.0
}

About

Unofficial SDK for the OneFinance.com API

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages