Asset Import
Paritech.Authority.Control Asset Import <Service>
Defines multiple Assets by importing from a file or STDIN.
Arguments
Section titled “Arguments”Field | Description |
---|---|
Service | The Authority Service to connect to. |
Available Options
Section titled “Available Options”Option | Description |
---|---|
-Cols <Columns> | A comma-separated list of column names. Defaults to type,code. |
-Enc <Encoding> | Input encoding. One of ASCII, UTF8 (default). |
-File <FileName> | Read from the given file |
-Format <Format> | Input data format. One of CSV (default), TSV, JSON. |
-Header | The input CSV data does contain a header line. With -Cols, specify to skip the header. |
-NoHeader | The input CSV data does not contain a header line. |
-Stdin | Read from STDIN. Default. |
When using the CSV format, Type and Code determine the Asset. Subsequent columns provide context information based on the column header. Empty values are ignored.
X:<AppCode>:<Key>
: Adds a Metadata value to theAppCode
application.X:<AppCode>:<IdName>:<Key>
: Adds an ID value to theIdName
set under theAppCode
application.
When using the JSON format, each line is interpreted as a JSON serialised Asset.
Output
Section titled “Output”The process result will be 0 on success, and a negative value on failure.
Examples
Section titled “Examples”Type,Code,X:Zenith:Visibilities:Full,X:Zenith:Visibilities:LimitedTradingAccount,XS:0001,,TradingAccount,XS:0002,,TradingAccount,XS:0003,,TradingAccount,XS:0004,,Market,XSX,"All&Full","Asset&Symbol,SymbolExtended,State,Pricing,Aggregates,Quantities,DepthTotals,Auction"
Paritech.Authority.Control Asset Import XOSP User 1234 < Assets.csv
{"Type":"TradingAccount","Code":"XS:0001"}{"Type":"TradingAccount","Code":"XS:0002"}{"Type":"TradingAccount","Code":"XS:0003"}{"Type":"TradingAccount","Code":"XS:0004"}{"Type":"Market","Code":"XSX","Context":[{"Application":"Zenith","IDs":[{"Name":"Visibilities","Values":{"Full":"All&Full","Limited":"Asset&Symbol,SymbolExtended,State,Pricing,Aggregates,Quantities,DepthTotals,Auction"}}]}]}
Paritech.Authority.Control Asset Import XOSP User 1234 -Format Json < Assets.json
More Information
Section titled “More Information”Utilises the /asset API.