Slyk
  • Introduction
  • Understanding Slyk
    • Before you Start
    • Core Concepts
    • Funding/Withdrawal Methods
  • Developing with Slyk
    • Step-by-step development guide
      • Authentication
      • Wallet
      • Catalog
      • Checkout (coming soon)
      • Growth tools (coming soon)
    • SDKs
      • Server SDK (Node.js)
        • Methods
      • Third party SDK's
  • API Reference
    • Using your API Key
    • Endpoints
      • Wallet
      • Transaction
      • Address
      • Asset
      • Rate
      • PaymentMethod
      • Movement
      • User
      • Invite
      • Category
      • Order
      • Product
      • Question
      • Task
      • TaxRate
    • Webhooks
      • Store
      • Transaction
      • User
    • Models
  • Setup Guides
    • PayPal Configuration
      • Verifying webhook
      • Webhook configuration
    • Stripe Configuration
      • Verifying endpoints
    • Coinbase Configuration
Powered by GitBook
On this page
  • Module endpoints
  • GET /assets
  • GET /assets/:code
  • PATCH /assets/:code
  • POST /assets

Was this helpful?

  1. API Reference
  2. Endpoints

Asset

PreviousAddressNextRate

Last updated 2 years ago

Was this helpful?

Module endpoints

GET /assets

GET https://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

The name filter performs a SQL query using the like operator.

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 https://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 https://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 https://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"
  }
}

GET /assets
GET /assets/:code
PATCH /assets/:code
POST /assets