Asset
Module endpoints
GET /assets
GET /assets
GEThttps://api.slyk.io/assets
Returns a paginated list of assets.
Name
Type
Example
code
= in nin
filter[code]=in:usd,eur,btc
enabled
=
filter[enabled]=true
name
like
filter[name]=bit
system
=
filter[system]=false
type
= in nin
filter[code]=nin:fiat
Name
Example
createdAt
sort=createdAt
sort=-createdAt
enabled
sort=enabled
sort=-enabled
system
sort=system
sort=-system
type
sort=type
sort=-type
Name
Description
Example
size
Defines the number of results per page. Default = 30.
page[size]=2
number
Defines the number of the page to retrieve. Default = 1
page[number]=2
{
"data": [
{
"code": "bar",
"contract": {},
"createdAt": "2019-07-20T14:30:37.483Z",
"customData": {
"description": "Foobar currency"
},
"decimalPlaces": 2,
"enabled": true,
"logo": null,
"metadata": {},
"name": "Foobar",
"symbol": "ƒ",
"system": false,
"type": "custom",
"updatedAt": "2019-07-20T14:30:37.483Z"
},
{
"code": "btc",
"contract": {},
"createdAt": "2019-07-20T14:30:37.483Z",
"customData": {},
"decimalPlaces": 8,
"enabled": true,
"logo": null,
"metadata": {},
"name": "Bitcoin",
"symbol": "BTC",
"system": true,
"type": "crypto"
"updatedAt": "2019-07-20T14:30:37.483Z"
}
],
"total": 2
}GET /assets/:code
GET /assets/:code
GEThttps://api.slyk.io/assets/:code
Returns the asset details of the given code.
{
"data": {
"code": "ltc",
"contract": {},
"createdAt": "2019-07-20T14:30:37.483Z",
"customData": {},
"decimalPlaces": 8,
"enabled": true,
"logo": null,
"metadata": {},
"name": "Litecoin",
"symbol": "LTC",
"system": true,
"type": "crypto",
"updatedAt": "2019-07-20T14:30:37.483Z"
}
}PATCH /assets/:code
PATCH /assets/:code
PATCHhttps://api.slyk.io/assets/:code
Patch the asset details of the given code.
Name
Type
Required
Description
contract
object
false
Asset contract configuration. Only applicable to crypto assets.
customData
object
false
Can store additional information about the asset.
decimalPlaces
integer
false
Number of decimal places.
enabled
boolean
false
Asset availability.
logo
string
false
Asset logo.
name
string
false
Asset name.
symbol
string
false
Asset symbol. Max length: 16.
{
"decimalPlaces": 6,
"name": "Foobiz"
}{
"data": {
"code": "biz",
"contract": {},
"createdAt": "2019-07-20T14:30:37.483Z",
"customData": {
"description": "Foobar currency"
},
"decimalPlaces": 6,
"enabled": true,
"logo": null,
"metadata": {},
"name": "Foobiz",
"symbol": "Bz",
"system": false,
"type": "custom",
"updatedAt": "2019-07-20T14:30:37.483Z"
}
}POST /assets
POST /assets
POSThttps://api.slyk.io/assets
Creates a new asset.
Name
Type
Required
Description
code
string
true
Asset identifier code. Must only contain digits and letters.
contract
object
false
Asset contract configuration. Only applicable to crypto assets.
customData
object
false
Can store additional information about the asset.
decimalPlaces
integer
true
Number of decimal places.
enabled
boolean
false
Asset availability.
name
string
true
Asset name.
symbol
string
false
Asset symbol. Max length: 16.
type
string
true
Asset type: crypto, custom or fiat.
{
"code": "kes",
"customData": {
"descritpion": "Currency of Kenya."
},
"decimalPlaces": 2,
"enabled": true,
"name": "Kenyan Shilling",
"symbol": "KSh",
"type": "fiat"
}{
"data": {
"code": "kes",
"contract": {},
"createdAt": "2019-07-20T14:30:37.483Z",
"customData": {
"descritpion": "Currency of Kenya."
},
"decimalPlaces": 2,
"enabled": true,
"logo": null,
"metadata": {},
"name": "Kenyan Shilling",
"symbol": "KSh",
"system": false,
"type": "fiat",
"updatedAt": "2019-07-20T14:30:37.483Z"
}
}Last updated
Was this helpful?