prometeo.banking

API Client

class prometeo.banking.client.Account(client, session_key, account_data)[source]

A bank account, returned by get_accounts()

get_movements(date_start, date_end)[source]

List an account’s movements for a range of dates.

Parameters
  • date_start (datetime) – Start of the date range for movements.

  • date_end (datetime) – End of the date range for movements.

Return type

List of Movement

class prometeo.banking.client.BankingAPIClient(api_key, environment)[source]

API Client for banking api

confirm_transfer(session_key, request_id, authorization_type, authorization_data)[source]

Confirm transfer.

Parameters
  • session_key (str) – The session key.

  • request_id (str) – Id of the request returned by the endpoint of preprocess_transfer()

  • authorization_type (str) –

    • cardCode Coordinates card

    • pin Account personal pin

    • otp One-time generated pin, sent by sms, email, hard token or soft token.

    • otp-api Hard token or soft token device, digitized by Prometeo

  • authorization_data (str) – Verification value (pin number, coordinates card response , etc) if there are several values, they must be separated by commas.

Return type

ConfirmTransfer

get_provider_detail(provider_code)[source]

Get more detailed information about a bank.

Parameters

provider_code (str) – Name of the provider, as returned in get_providers()

Return type

ProviderDetail

get_providers()[source]

List all available banks.

Return type

Provider

list_transfer_institutions(session_key)[source]

List transfer institutions.

Parameters

session_key (str) – The session key.

Return type

TransferInstitution

login(provider, username, password, **kwargs)[source]

Start log in process with the provider

Parameters
  • provider (str) – Name of the provider, use get_providers() to get a list of available providers

  • username (str) – Username used to log in to the banking app or web

  • password (str) – User’s password

  • kwargs (dict) – Extra login fields for providers that require it, use get_provider_detail() to get a list of all the auth login fields

Return type

Session

logout(session_key)[source]

Logs the user out and invalidates its session.

Parameters

session_key (str) – The session key.

on_response(data)[source]

Called after every 200 response

preprocess_transfer(session_key, origin_account, destination_institution, destination_account, currency, amount, concept, destination_owner_name, branch)[source]

Preprocess transfer.

Parameters
  • session_key (str) – The session key.

  • origin_account (str) – Account number from where it is transferred

  • destination_institution (str) – Id of the institution where it is transferred. As provided by get_providers()

  • destination_account (str) – Account number where it is transferred

  • currency (str) – Account currency in format ISO 4217

  • amount (str) – Amount to transfer

  • concept (str) – Concept or description of the transfer

  • destination_owner_name (str) – Name of the holder of the destination account (empty if not applicable)

  • branch (str) – Branch number of the destination account (empty if not applicable)

Return type

PreprocessTransfer

session_class

alias of Session

class prometeo.banking.client.CreditCard(client, session_key, card_data)[source]

A credit card, returned by get_credit_cards()

get_movements(currency_code, date_start, date_end)[source]

List credit card’s movements for a range of dates.

Parameters
  • date_start (datetime) – Start of the date range for movements.

  • date_end (datetime) – End of the date range for movements.

Return type

List of Movement

class prometeo.banking.client.Session(client, status, session_key, context=None, field=None)[source]

Encapsulates the user’s session, returned by login()

confirm_transfer(request_id, authorization_type, authorization_data)[source]

Confirm transfer.

Parameters
  • request_id (str) – Id of the request returned by the endpoint of preprocess_transfer()

  • authorization_type (str) –

    • cardCode Coordinates card

    • pin Account personal pin

    • otp One-time generated pin, sent by sms, email, hard token or soft token.

    • otp-api Hard token or soft token device, digitized by Promete

  • authorization_data (str) – Verification value (pin number, coordinates card response , etc) if there are several values, they must be separated by commas.

Return type

ConfirmTransfer

finish_login(provider, username, password, answer)[source]

Answer the security challenge, like an OTP or personal question.

Parameters
  • provider (str) – The provider used to login

  • username (str) – The username used to login

  • password (str) – The password used to login

  • answer (str) – The answer to the login challenge

get_accounts()[source]

List all the user’s accounts

Return type

List of Account

get_clients()[source]

List the user’s clients. Returns an empty list if the bank doesn’t uses clients.

Return type

List of Client

get_credit_cards()[source]

List all the user’s credit cards

Return type

List of CreditCard

get_interactive_context()[source]

Necessary information to answer the login challenge, like a security question.

Return type

str

list_transfer_institutions()[source]

List transfer institutions.

Return type

TransferInstitution

logout()[source]

Logs the user out and invalidates its session.

preprocess_transfer(origin_account, destination_institution, destination_account, currency, amount, concept, destination_owner_name, branch)[source]

Preprocess transfer.

Parameters
  • origin_account (str) – Account number from where it is transferred

  • destination_institution (str) – Id of the institution where it is transferred. As provided by get_providers()

  • destination_account (str) – Account number where it is transferred

  • currency (str) – Account currency in format ISO 4217

  • amount (str) – Amount to transfer

  • concept (str) – Concept or description of the transfer

  • destination_owner_name (str) – Name of the holder of the destination account (empty if not applicable)

  • branch (str) – Branch number of the destination account (empty if not applicable)

Return type

PreprocessTransfer

select_client(client)[source]

Selects the client to use for this session.

Parameters

client_id (str) – The id of the client, obtained from listing the clients

Models

class prometeo.banking.models.Account(id, name, number, branch, currency, balance)
property balance

Alias for field number 5

property branch

Alias for field number 3

property currency

Alias for field number 4

property id

Alias for field number 0

property name

Alias for field number 1

property number

Alias for field number 2

class prometeo.banking.models.Client(id, name)
property id

Alias for field number 0

property name

Alias for field number 1

class prometeo.banking.models.ConfirmTransfer(message, success)
property message

Alias for field number 0

property success

Alias for field number 1

class prometeo.banking.models.CreditCard(id, name, number, close_date, due_date, balance_local, balance_dollar)
property balance_dollar

Alias for field number 6

property balance_local

Alias for field number 5

property close_date

Alias for field number 3

property due_date

Alias for field number 4

property id

Alias for field number 0

property name

Alias for field number 1

property number

Alias for field number 2

class prometeo.banking.models.Movement(id, reference, date, detail, debit, credit, extra_data)
property credit

Alias for field number 5

property date

Alias for field number 2

property debit

Alias for field number 4

property detail

Alias for field number 3

property extra_data

Alias for field number 6

property id

Alias for field number 0

property reference

Alias for field number 1

class prometeo.banking.models.PreprocessTransfer(approved, authorization_devices, message, request_id)
property approved

Alias for field number 0

property authorization_devices

Alias for field number 1

property message

Alias for field number 2

property request_id

Alias for field number 3

class prometeo.banking.models.Provider(code, country, name)
property code

Alias for field number 0

property country

Alias for field number 1

property name

Alias for field number 2

class prometeo.banking.models.ProviderDetail(country, name, auth_fields)
property auth_fields

Alias for field number 2

property country

Alias for field number 0

property name

Alias for field number 1

class prometeo.banking.models.TransferInstitution(id, name)
property id

Alias for field number 0

property name

Alias for field number 1