Instrument Record
Get Instrument
The instrument record of a token, your overview and whether your instance can publish the record
GET
/
instruments
/
api
/
{tokenAddress}
curl "https://api.trusset.org/instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"instrument": null,
"assertedHere": false,
"presentation": { "sector": "Fixed income" },
"carriedFromProfile": {},
"unmappableFromProfile": { "fields": [], "documents": 0 },
"authority": {
"holds": false,
"basis": null,
"wallet": null,
"wallets": ["0x5d2f8a0c34b1e9d7f6a2c4e8b0d1f3a5c7e9e809"],
"owner": "0x7f6032507e7b098bd80657920656954d5e7f1acd",
"message": "None of this instance's verified wallets (0x5d2f8a0c34b1e9d7f6a2c4e8b0d1f3a5c7e9e809) is the token's owner, one of its agents or its admin on chain, and the token was not issued through this instance, so this instance cannot save the record on its own. Only the token's controller can publish this record. On chain the token's owner is 0x7f6032507e7b098bd80657920656954d5e7f1acd; an agent of the token or a holder of its admin role also controls it. If one of your own wallets controls the token, add it as a verified wallet of this instance on the Wallet page. Otherwise the record comes through the API, signed by the controller: POST /instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f/approval-request returns the message to sign, then PUT /instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f with issuerApproval. The published overview stays editable here either way."
},
"issuedHere": false
}
}
Returns the one instrument record every lender reads for the token on this chain, your instance’s overview of it, and whether your instance can publish the record on its own. The token has to be an active import of your instance, or issued through it.
Path Parameters
string
required
The token contract address.
Response Fields
object
Show child attributes
Show child attributes
object
The record, or
null when nobody has published one yet.Show child attributes
Show child attributes
integer
Starts at
1 and rises with every save, release and takeover. An issuer approval signs the version it applies to.object
One entry per field, each
{ value, provenance, assertedBy, assertedAt, evidence, verification }. provenance is ISSUER_ASSERTED for a value an instance published, REGISTER_GLEIF for the issuer identity resolved from the LEI and ABSENT for a field that holds nothing.array
The offering documents, each with its
docType, uri, sha256 contentHash, mimeType, bytes, language, version and issuedAt.object
{ fields, documents } the record’s securityClass expects and does not carry yet.object
Who stands behind the record:
companyName, the on-chain authority it was published on (basis, wallet, and via: "ISSUER_SIGNATURE" when the token’s controller signed it) and the approval that signed it.boolean
true when the asserting instance released the record and no instance stands behind it.boolean
true when your instance asserts the record and still controls the token.boolean
true when your instance asserts the record.object
Your instance’s overview, the fields Update Profile writes.
object
Values an older profile of yours holds for record fields that are still empty. Nothing in it is published until it is saved.
object
{ fields, documents } an older profile holds that the record cannot take.object
Whether your instance can publish the record on its own, read from the chain now.
Show child attributes
Show child attributes
boolean
true when a verified wallet of your instance is the token’s owner(), one of its agents or a holder of DEFAULT_ADMIN_ROLE, or the token was issued through your instance. false otherwise: the record then comes from the token’s controller through the issuer-signed flow. null with readFailed: true when the chain or the wallets could not be read.string
ISSUING_INSTANCE, TOKEN_OWNER, TOKEN_AGENT or TOKEN_ADMIN.string
The verified wallet that holds the role.
array
Your instance’s verified wallets that were checked.
string
The token’s
owner() when the contract answers one.string
When
holds is false, the sentence to show the user, naming the controller and both ways the record can come in.boolean
true when the token was issued through your instance.curl "https://api.trusset.org/instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"instrument": null,
"assertedHere": false,
"presentation": { "sector": "Fixed income" },
"carriedFromProfile": {},
"unmappableFromProfile": { "fields": [], "documents": 0 },
"authority": {
"holds": false,
"basis": null,
"wallet": null,
"wallets": ["0x5d2f8a0c34b1e9d7f6a2c4e8b0d1f3a5c7e9e809"],
"owner": "0x7f6032507e7b098bd80657920656954d5e7f1acd",
"message": "None of this instance's verified wallets (0x5d2f8a0c34b1e9d7f6a2c4e8b0d1f3a5c7e9e809) is the token's owner, one of its agents or its admin on chain, and the token was not issued through this instance, so this instance cannot save the record on its own. Only the token's controller can publish this record. On chain the token's owner is 0x7f6032507e7b098bd80657920656954d5e7f1acd; an agent of the token or a holder of its admin role also controls it. If one of your own wallets controls the token, add it as a verified wallet of this instance on the Wallet page. Otherwise the record comes through the API, signed by the controller: POST /instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f/approval-request returns the message to sign, then PUT /instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f with issuerApproval. The published overview stays editable here either way."
},
"issuedHere": false
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_ADDRESS | 400 | tokenAddress is not a valid address |
IMPORT_NOT_FOUND | 404 | The token is not an active import of your instance and was not issued through it |
IMPORT_LOOKUP_FAILED | 503 | The import could not be read. Retry shortly |
INSTRUMENT_UNREADABLE | 503 | The record could not be read. Retry shortly |
⌘I
curl "https://api.trusset.org/instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f" \
-H "X-API-Key: trusset_your_key_here"
{
"success": true,
"data": {
"instrument": null,
"assertedHere": false,
"presentation": { "sector": "Fixed income" },
"carriedFromProfile": {},
"unmappableFromProfile": { "fields": [], "documents": 0 },
"authority": {
"holds": false,
"basis": null,
"wallet": null,
"wallets": ["0x5d2f8a0c34b1e9d7f6a2c4e8b0d1f3a5c7e9e809"],
"owner": "0x7f6032507e7b098bd80657920656954d5e7f1acd",
"message": "None of this instance's verified wallets (0x5d2f8a0c34b1e9d7f6a2c4e8b0d1f3a5c7e9e809) is the token's owner, one of its agents or its admin on chain, and the token was not issued through this instance, so this instance cannot save the record on its own. Only the token's controller can publish this record. On chain the token's owner is 0x7f6032507e7b098bd80657920656954d5e7f1acd; an agent of the token or a holder of its admin role also controls it. If one of your own wallets controls the token, add it as a verified wallet of this instance on the Wallet page. Otherwise the record comes through the API, signed by the controller: POST /instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f/approval-request returns the message to sign, then PUT /instruments/api/0x9f8c1d4b2e7a3056c1b8f4d29e0a7c3518b6d24f with issuerApproval. The published overview stays editable here either way."
},
"issuedHere": false
}
}
