Pockets

Now that you've created your first Customer, you can begin creating Pockets.

Jiko Pockets (formerly known as Accounts) consist of a bank account and a brokerage account. The brokerage account has an associated T-bill maturity (e.g. 4-week), and when funds are deposited into the Pocket, they're immediately invested in T-bills of the configured maturity.

Pockets Diagram

Using the Pocket endpoints, you can flexibly create the optimal set of Pockets—with corresponding T-bill maturities—needed to deliver the most value to your customers. Example use cases include:

  1. A consumer fintech app with both transactional (4-week T-bills) and investment (52-week T-bills) Pockets
  2. A B2B cash management platform offering separate Pockets for different operational areas, budgets, etc.

In this guide, we'll cover getting the list of available Pocket Configurations (T-bill maturities) and creating your first Pocket.

Getting available Pocket Configurations

Before creating the first Pocket, query the available T-bill maturities by calling List Pocket Configurations:

Example Request: List Pocket Configurations

send_jiko_request "GET" "/api/v2/pocket-configurations/"

Example Response: List Pocket Configurations

{
  "offset": 0,
  "count": 4,
  "items": [
    {
      "id": "UST-4W",
      "description": "US T-bills, 4-week, Buy-and-hold"
    },
    {
      "id": "UST-13W",
      "description": "US T-bills, 13-week, Buy-and-hold"
    },
    {
      "id": "UST-26W",
      "description": "US T-bills, 26-week, Buy-and-hold"
    },
    {
      "id": "UST-52W",
      "description": "US T-bills, 52-week, Buy-and-hold"
    }
  ],
  "object_type": "List"
}

Creating the first Pocket

To create a Pocket, make a call to Create Pocket using the customer_id of your newly created customer, the desired Pocket Configuration ID from the previous step, and a custom Pocket Name.

In this example, we'll create a Pocket to automate investing in 26-week T-bills:

Example Request: Create Pocket

customer_id="7e02ba9f-46c6-4cd6-a152-f366371976b3"
body='{
    "pocket_configuration_id": "UST-26W",
    "pocket_name": "26-week T-bills"
}'
send_jiko_request "POST" "/api/v2/customers/${customer_id}/pockets/" $body

Now that you've created the Pocket, you can call List Pockets or Get Pocket to view the Pocket's full details:

Example Request: List Pockets

customer_id="7e02ba9f-46c6-4cd6-a152-f366371976b3"
send_jiko_request "GET" "/api/v2/customers/${customer_id}/pockets/"

Example Response: List Pockets

{
  "offset": 0,
  "count": 1,
  "items": [
    {
      "id": "d0e1dd1b-3e21-4cd4-9872-f71ea4967ffd",
      "pocket_name": "26-week T-bills",
      "pocket_configuration_id": "UST-26W",
      "portfolio": {
        "securities": [],
        "cash": {
          "value": 0,
          "currency": "USD",
          "formatted": "$0.00"
        },
        "all_time_earnings": {
          "value": 0,
          "currency": "USD",
          "formatted": "$0.00"
        },
        "total_value": {
          "value": 0,
          "currency": "USD",
          "formatted": "$0.00"
        }
      },
      "status": "PENDING",
      "object_type": "Pocket"
    }
  ],
  "object_type": "List"
}

Note: Pocket creation is asynchronous but should be completed within seconds. The Pocket's "status" will update from "PENDING" to "OPEN", at which point funds can be deposited into the Pocket (see Portals and ACH for more).

Congratulations, you created your first Pocket! There's no limit on the number of Pockets per maturity, so you can continue to create 26-week Pockets, create one Pocket for each available maturity, or any other combination needed to empower your customers to safely and easily invest in US Treasury Bills.


Last updated: December 18, 2023