btp CLI Reference

A command line interface, btp, can submit transactions and display the current state of the validator’s object-based store. This includes creating and viewing organizations, users, bonds, holdings, orders, quotes, etc.

btp

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
usage: btp [-h] [-v]
           {init,load,bond,org,holding,user,order,quote,settlement,receipt}
           ...

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv

subcommands:
  {init,load,bond,org,holding,user,order,quote,settlement,receipt}
    init                configure the cli client
    load                load a YAML file
    bond                list and show bonds
    org                 list, show, and create organizations
    holding             list, show, and create holdings
    user                list, show, register, and update users
    order               list, show, and create orders
    quote               list, show, and create quotes
    settlement          list, show, and create settlements
    receipt             list and show receipts

btp init

1
2
3
4
5
6
7
8
9
usage: btp init [-h] [-v] [--username USERNAME] [--url URL]

optional arguments:
  -h, --help           show this help message and exit
  -v, --verbose        add more v's for more information e.g. -vv
  --username USERNAME  the name of the user
  --url URL            the url of the validator to connect with

Example: btp init --username johndoe --url http://192.168.5.1:8800

btp bond

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
usage: btp bond [-h] [-v] {list,show} ...

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

bond subcommands:
  {list,show}
    list         list all the bonds
    show         show a particular bond

btp bond list

1
2
3
4
5
6
7
usage: btp bond list [-h] [-v] [--yaml] [--full]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --yaml         display the list of bonds in YAML format
  --full         show columns wider than 30 characters
1
btp bond list

btp bond show

1
2
3
4
5
6
7
8
usage: btp bond show [-h] [-v] identifier

positional arguments:
  identifier     object id, isin, or cusip

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp holding

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
usage: btp holding [-h] [-v] {create,list,show} ...

optional arguments:
  -h, --help          show this help message and exit
  -v, --verbose       add more v's for more information e.g. -vv

holding subcommands:
  {create,list,show}
    create            create a holding
    list              list all holdings, or just those specified with --org
    show              show a particular holding

btp holding create

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
usage: btp holding create [-h] [-v] [--wait] [--object-id OBJECT_ID]
                          owner asset-type asset-id amount

positional arguments:
  owner                 the object-id, ticker, or pricing-source of the
                        organization
  asset-type            either Currency or Bond
  asset-id              The bond identifier(isin, cusip, object-id) or if
                        Currency the string USD
  amount                The amount of the holding

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv
  --wait                wait for this commit before exiting
  --object-id OBJECT_ID
                        optionally specify the created holding's object-id

Example:
                    btp holding create CMP3 Currency USD 1000000000
                    btp holding create CMP1 Bond US2847D48509 100000

btp holding list

1
2
3
4
5
6
7
8
9
usage: btp holding list [-h] [-v] [--org ORG] [--yaml] [--full]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --org ORG      the org object-id, ticker, or pricing-source (only applies to
                 marketmakers
  --yaml         Display the holding info in YAML
  --full         display columns that are wider than 30 characters
1
btp holding list

btp holding show

1
2
3
4
5
6
7
8
usage: btp holding show [-h] [-v] identifier

positional arguments:
  identifier     the object id of the holding

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp load

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
usage: btp load [-h] [-v] [--wait] filename [filename ...]

positional arguments:
  filename       filename of YAML file to load

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --wait         wait for this commit before exiting

Example: btp load data.yml

btp order

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
usage: btp order [-h] [-v] {create,list,show} ...

optional arguments:
  -h, --help          show this help message and exit
  -v, --verbose       add more v's for more information e.g. -vv

order subcommands:
  {create,list,show}
    create            create an order
    list              list all orders limited by --user or --org
    show              show a particular order, including settlement if
                      applicable

btp order create

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
usage: btp order create [-h] [-v] [--firm-id FIRM_ID] [--isin ISIN]
                        [--cusip CUSIP] [--limit-price LIMIT_PRICE]
                        [--limit-yield LIMIT_YIELD] [--object-id OBJECT_ID]
                        [--wait]
                        action order-type quantity

positional arguments:
  action                Buy or Sell
  order-type            Limit or Market
  quantity              the amount of bonds being sold or bought e.g. 1000000

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv
  --firm-id FIRM_ID     the organization's object-id
  --isin ISIN           the isin of the bond the order is on
  --cusip CUSIP         the cusip of the bond the order is on (one of --cusip
                        or --isin is required)
  --limit-price LIMIT_PRICE
                        the limit-price to buy or sell at e.g. "101-15 1/4"
  --limit-yield LIMIT_YIELD
                        the limit-yield to buy or sell at e.g. 1.248
  --object-id OBJECT_ID
                        specify an object-id for the order
  --wait                wait for this commit before exiting

Example:
btp order create --isin US035242AP13 Buy Market 100000 --firm-id OBJECT_ID

btp order list

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
usage: btp order list [-h] [-v] [--yaml] [--full] [--user USER | --org ORG]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --yaml
  --full         display columns wider than 30 characters
  --user USER    the object-id, key-id, or username of user
  --org ORG      the object-id, ticker, or pricing-source (only applies to
                 marketmakers)
1
btp order list

btp order show

1
2
3
4
5
6
7
8
usage: btp order show [-h] [-v] identifier

positional arguments:
  identifier     the object-id of the order

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp org

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
usage: btp org [-h] [-v] {create,list,show} ...

optional arguments:
  -h, --help          show this help message and exit
  -v, --verbose       add more v's for more information e.g. -vv

org subcommands:
  {create,list,show}
    create            create an organization
    list              list all organizations
    show              show a particular organization

btp org create

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
usage: btp org create [-h] [-v] [--object-id OBJECT_ID] [--ticker TICKER]
                      [--pricing-src PRICING_SRC] [--industry INDUSTRY]
                      [--auth AUTH] [--wait]
                      name

positional arguments:
  name                  the name of the organization. e.g. "Company 10"

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv
  --object-id OBJECT_ID
                        specify the object-id for the organization
  --ticker TICKER       the ticker symbol of the organization
  --pricing-src PRICING_SRC
                        a four letter code for marketmakers
  --industry INDUSTRY   the organization's industry
  --auth AUTH           who in the organization is authorized to act as
                        marketmaker or trader as an array of json objects e.g.
                        '[{"Role": "marketmaker", "ParticipantId":
                        "OBJECT_ID"}]'
  --wait                wait for this commit before exiting

Example:
    btp org create --ticker CMP10 --industry Technology 'Company 10'

btp org list

1
2
3
4
5
6
7
usage: btp org list [-h] [-v] [--yaml] [--full]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --yaml         display the list in YAML format
  --full         list columns wider than 30 characters
1
btp org list

btp org show

1
2
3
4
5
6
7
8
9
usage: btp org show [-h] [-v] identifier

positional arguments:
  identifier     object-id, ticker, or pricing-source (only applies to
                 marketmakers

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp quote

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
usage: btp quote [-h] [-v] {create,list,show} ...

optional arguments:
  -h, --help          show this help message and exit
  -v, --verbose       add more v's for more information e.g. -vv

quote subcommands:
  {create,list,show}
    create            create a quote
    list              list all quotes, or filter by --org or --user
    show              show a particular quote

btp quote create

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
usage: btp quote create [-h] [-v] [--isin ISIN] [--cusip CUSIP]
                        [--object-id OBJECT_ID] [--wait]
                        firm ask-price ask-qty bid-price bid-qty

positional arguments:
  firm                  the pricing-source of the firm making the quote
  ask-price             the ask price
  ask-qty               the ask quantity
  bid-price             the bid price
  bid-qty               The bid quantity

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv
  --isin ISIN           the isin of the bond
  --cusip CUSIP         The cusip of the bond, (either --cusip or --isin must
                        be specified)
  --object-id OBJECT_ID
                        optionally specify the created quote's object-id
  --wait                wait for this commit before exiting

Example:
btp quote create --cusip 22160KAF2 CMP2 '101-13+' 100000 '99-12 1/8' 100000

btp quote list

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
usage: btp quote list [-h] [-v] [--org ORG] [--user USER] [--yaml] [--full]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --org ORG      The org object-id, ticker, or pricing-source (only applies to
                 marketmakers
  --user USER    The username, object-id, or key-id of the user
  --yaml         display the quote info in YAML
  --full         display columns that are wider than 30 characters
1
btp quote list

btp quote show

1
2
3
4
5
6
7
8
usage: btp quote show [-h] [-v] identifier

positional arguments:
  identifier     The object-id of the quote

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp receipt

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
usage: btp receipt [-h] [-v] {list,show} ...

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

receipt subcommands:
  {list,show}
    list         list redemptions and coupons, filter by --org (payee) or
                 --bond
    show         show a particular redemption or coupon

btp receipt list

1
2
3
4
5
6
7
8
9
usage: btp receipt list [-h] [-v] [--bond BOND | --org ORG] [--yaml] [--full]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --bond BOND    the isin, cusip, or bond object-id
  --org ORG      the ticker, pricing-source, or organization object-id
  --yaml         display in YAML format
  --full         Display columns wider than 30 characters
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
btp receipt list
Timestamp           CouponDate   PaymentType   Amount    ObjectType  
08/04/16 17:37:54   08/04/2016   Coupon        11986.3   receipt     
08/04/16 17:37:54   08/04/2016   Coupon        11986.3   receipt     
08/04/16 17:37:54   08/04/2016   Coupon        7707.81   receipt     
08/04/16 17:37:54   08/04/2016   Coupon        11986.3   receipt     
08/04/16 17:37:54   N/A          Redemption    1000000   receipt     
08/04/16 17:37:54   N/A          Redemption    1000000   receipt     
08/04/16 17:37:54   08/04/2016   Coupon        11986.3   receipt     
08/04/16 17:37:54   08/04/2016   Coupon        11986.3   receipt     
08/04/16 17:37:54   08/04/2016   Coupon        7707.81   receipt     
...

btp receipt show

1
2
3
4
5
6
7
8
usage: btp receipt show [-h] [-v] identifier

positional arguments:
  identifier     the object-id of the receipt

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp settlement

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
usage: btp settlement [-h] [-v] {create,list,show} ...

optional arguments:
  -h, --help          show this help message and exit
  -v, --verbose       add more v's for more information e.g. -vv

settlement subcommands:
  {create,list,show}
    create            create a settlement
    list              list all settlements, filter by --creator (key-id,
                      username, or object-id of the creator of the settlement)
    show              show a particular settlement

btp settlement create

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
usage: btp settlement create [-h] [-v] [--object-id OBJECT_ID] [--wait]
                             order-id

positional arguments:
  order-id              the object-id of the order for settlement

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv
  --object-id OBJECT_ID
                        optionally specify the created settlement's object-id
  --wait                wait for this commit before exiting

Example:
                    btp settlement create OBJECT_ID

btp settlement list

1
2
3
4
5
6
7
8
usage: btp settlement list [-h] [-v] [--creator CREATOR] [--full] [--yaml]

optional arguments:
  -h, --help         show this help message and exit
  -v, --verbose      add more v's for more information e.g. -vv
  --creator CREATOR  the key-id, username, or object-id
  --full             display columns that are wider than 30 characters
  --yaml             display as settlement as YAML
1
2
3
btp settlement list
BondQuantity   ObjectType   Action   CurrencyAmount  
100000         settlement   Sell     98183.59375     

btp user

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
usage: btp user [-h] [-v] {register,update,list,show} ...

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv

User subcommands:
  {register,update,list,show}
    register            register the current user
    update              update the username and/or firm-id
    list                list all users
    show                show a particular user

btp user list

1
2
3
4
5
6
7
usage: btp user list [-h] [-v] [--yaml] [--full]

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv
  --yaml         display the holding info in YAML
  --full         display columns wider than 30 characters
1
2
3
btp user list
Username           ObjectType   
FirstParticipant   participant  

btp user register

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
usage: btp user register [-h] [-v] [--firm-id FIRM_ID] [--object-id OBJECT_ID]
                         [--wait]

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         add more v's for more information e.g. -vv
  --firm-id FIRM_ID     the object-id of the organization
  --object-id OBJECT_ID
                        specify the object-id of the created user
  --wait                wait for this commit before exiting

Example:
                    btp user init --username johndoe
                    btp user register

btp user show

1
2
3
4
5
6
7
8
usage: btp user show [-h] [-v] identifier

positional arguments:
  identifier     the username, object-id, or key-id of the user

optional arguments:
  -h, --help     show this help message and exit
  -v, --verbose  add more v's for more information e.g. -vv

btp user update

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
usage: btp user update [-h] [-v] [--username USERNAME] [--firm-id FIRM_ID]
                       [--wait]
                       object-id

positional arguments:
  object-id            the object-id of the user to update

optional arguments:
  -h, --help           show this help message and exit
  -v, --verbose        add more v's for more information e.g. -vv
  --username USERNAME  the username to change the user to, (must be unique)
  --firm-id FIRM_ID    the firm-id to add or change for the user
  --wait               wait for this commit before exiting