Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified transfers #487

Merged
merged 2 commits into from
Oct 12, 2024
Merged

Conversation

SolarWolf-Code
Copy link
Contributor

@SolarWolf-Code SolarWolf-Code commented Aug 2, 2024

Adds a function to get unified transfers. From what I can tell this is currently the only way to get debit/credit transfer info which is how I stumbled across it (trying to calculate total contributions). From what I can tell there is no endpoint similar to /ach/transfers or /wire/transfers for card related transfers.

Nevertheless, this PR adds a way to get all transfer types in a single request. The url was found via network tab in browser when viewing https://robinhood.com/account/transfers which is how they probably populate the 'Completed Transfers' area of the page.

Example json output with redacted values:

[
    {
        "id": "REDACTED",
        "originating_account_id": "REDACTED",
        "originating_account_type": "rhs_account",
        "originating_user_uuid": "REDACTED",
        "receiving_account_id": "REDACTED",
        "receiving_account_type": "debit_card_instrument",
        "receiving_user_uuid": "REDACTED",
        "transfer_type": "debit_card_funding",
        "amount": "350.00",
        "currency": "usd",
        "direction": "pull",
        "state": "completed",
        "record_date": null,
        "ref_id": null,
        "description": null,
        "created_at": "2024-08-02T02:08:48.387434-04:00",
        "updated_at": "2024-08-02T02:08:57.834119-04:00",
        "service_fee": "0.00",
        "service_fee_discount_amount": "0.00",
        "net_amount": "350.00",
        "details": {
            "state": "completed",
            "version": null,
            "transfer_type": "debit_card_funding",
            "clawback_amount": null,
            "purpose": "customer_initiated",
            "gold_deposit_boost": null
        },
        "service_fee_discount_details": [],
        "radar_session_id": null,
        "is_visible_in_history": true,
        "is_owner": true,
        "owner_name": null
    },
    {
        "id": "REDACTED",
        "originating_account_id": "REDACTED",
        "originating_account_type": "rhs_account",
        "originating_user_uuid": "REDACTED",
        "receiving_account_id": "REDACTED",
        "receiving_account_type": "ach_relationship",
        "receiving_user_uuid": "REDACTED",
        "transfer_type": "originated_ach",
        "amount": "25",
        "currency": "usd",
        "direction": "pull",
        "state": "cancelled",
        "record_date": null,
        "ref_id": "",
        "description": "",
        "created_at": "2021-02-02T00:49:36.868072-05:00",
        "updated_at": "2021-02-02T01:01:23.730309-05:00",
        "service_fee": "0.00",
        "service_fee_discount_amount": null,
        "net_amount": "25",
        "details": {
            "account": null,
            "ach_relationship": "https://api.robinhood.com/ach/relationships/REDACTED/",
            "amount": "25.00",
            "cancel": null,
            "created_at": "2021-02-02T05:49:36.868072+00:00",
            "direction": "deposit",
            "early_access_amount": "0.00",
            "expected_landing_date": "2021-02-08",
            "expected_landing_datetime": "2021-02-08T09:00:00-05:00",
            "expected_sweep_at": null,
            "fees": "0.00",
            "id": "REDACTED",
            "ref_id": "REDACTED",
            "rhs_state": "cancelled",
            "scheduled": false,
            "state": "cancelled",
            "status_description": "",
            "updated_at": "2021-02-02T06:01:23.730309+00:00",
            "url": "https://bonfire.robinhood.com/paymenthub/unified_transfers/REDACTED/",
            "investment_schedule_id": null,
            "instant_limit_to_grant": "0.00",
            "is_eligible_for_instant_transfer": false,
            "upsell_id": null,
            "version": "1",
            "transfer_type": "originated_ach",
            "enoki_amount": null,
            "enoki_removal_fee": null,
            "clawback_amount": null,
            "gold_deposit_boost": null
        },
        "service_fee_discount_details": null,
        "radar_session_id": null,
        "is_visible_in_history": true,
        "is_owner": true,
        "owner_name": null
    }
]

If there is another way to get debit/credit transfers please either comment or open another PR, but I think this function is still handy for an all-in-one solution.

@jmfernandes jmfernandes merged commit c033856 into jmfernandes:master Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants