Methods
Address
The result of each one of the following address methods return one or an array of Address objects that include the following methods:
getAsset: Returns theassetof theaddressassetCode.getData: Returns theaddressdetails.getWallet: Returns thewalletof theaddresswalletIdif set.
address.create
address.createCreates a new address.
Example:
Request
await slyk.address.create({
  address: '1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp',
  assetCode: 'btc',
  walletId: '9afa8a2d-023a-4040-b591-c03077f43d23'
});Response
{
  "address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
  "assetCode": "btc",
  "customData": {},
  "createdAt": "2019-03-20T14:30:37.483Z",
  "metadata": {},
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
}address.get
address.getRetrieves the address of the given address.
Example:
Request
await slyk.address.get('1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp');Response
{
  "address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
  "assetCode": "btc",
  "customData": {},
  "createdAt": "2019-03-20T14:30:37.483Z",
  "metadata": {},
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
}address.list
address.listRetrieves a list of addresses.
Example:
Request
await slyk.address.list({
  page: { size: 2 },
  sort: [{ name: 'createdAt'}],
  filter: { walletId: '9afa8a2d-023a-4040-b591-c03077f43d23' }
});Response
{
  "results": [{
    "address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
    "assetCode": "btc",
    "customData": {},
    "createdAt": "2019-03-20T14:30:37.483Z",
    "metadata": {},
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
  },
  {
    "address": "D7SrewuwiEFDtD69L336ADGf6EF2owohLg",
    "assetCode": "doge",
    "customData": {},
    "createdAt": "2019-03-20T14:30:37.483Z",
    "metadata": {},
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
  }],
  "total": 32
}Asset
The result of each one of the following asset methods return one or an array of Asset objects that include the following methods:
getConnection: Returns theconnectionof theassetconnectionIdif set.getData: Returns theassetdetails.patch: Patches theasset.
asset.create
asset.createCreates a new asset.
Example:
Request
await slyk.asset.create({
  code: 'bar',
  name: 'Foobar Coin',
  symbol: 'ƒ'
});Response
{
  "code": "bar",
  "connectionId": null,
  "contract": {},
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "decimalPlaces": 8,
  "enabled": false,
  "logoUrl": null,
  "metadata": {},
  "name": "Foobar coin",
  "symbol": "ƒ",
  "system": false,
  "type": "custom",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}asset.get
asset.getRetrieves the asset of the given code.
Example:
Request
await slyk.asset.get('bar');Response
{
  "code": "bar",
  "connectionId": null,
  "contract": {},
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "decimalPlaces": 8,
  "enabled": false,
  "logoUrl": null,
  "metadata": {},
  "name": "Foobar coin",
  "symbol": "ƒ",
  "system": false,
  "type": "custom",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}asset.list
asset.listRetrieves a list of assets.
Example:
Request
await slyk.asset.list({
  page: { size: 2 },
  sort: [{ direction: 'desc', name: 'code' }],
  filter: { name: 'foo' }
});Response
{
  "results": [{
    "code": "bar",
    "connectionId": null,
    "contract": {},
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "decimalPlaces": 8,
    "enabled": false,
    "logoUrl": null,
    "metadata": {},
    "name": "Foobar coin",
    "symbol": "ƒ",
    "system": false,
    "type": "custom",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "code": "biz",
    "connectionId": null,
    "contract": {},
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "decimalPlaces": 8,
    "enabled": false,
    "logoUrl": null,
    "metadata": {},
    "name": "Foobiz coin",
    "symbol": "Ɓ",
    "system": false,
    "type": "custom",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 32
}asset.patch
asset.patchModifies the details the asset of the given code.
Example:
Request
await slyk.asset.patch('bar' { customData: { qux: 'quux' } });Response
{
  "code": "bar",
  "connectionId": null,
  "contract": {},
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": { "qux": "quux" },
  "decimalPlaces": 8,
  "enabled": false,
  "logoUrl": null,
  "metadata": {},
  "name": "Foobar coin",
  "symbol": "ƒ",
  "system": false,
  "type": "custom",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}Invite
The result of each one of the following invite methods return one or an array of Invite objects that include the following methods:
cancel: Cancels theinvite.getData: Returns theinvitedetails.getInvitedUser: Returns theuserof theinviteinvitedUserIdif set.getInviterUser: Returns theuserof theinviteinviterUserIdif set.validate: Validates theinvite.
invite.cancel
invite.cancelCancels the invite of the given code.
Example:
Request
await slyk.invite.cancel('447fcf25-4e70-47a0-a2ad-a8f0aadf5a91');Response
trueinvite.create
invite.createCreates a new invite.
Example:
Request
await slyk.invite.create({ 
    email: '[email protected]', 
    inviterUserId: '26b7d8c3-d21c-420b-9820-9e8b822b90d2' 
});Response
{
  "code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "expiredAt": "2019-04-20T14:30:37.483Z",
  "invitedEmail": "[email protected]",
  "invitedUserId": null,
  "inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
  "status": "pending",
  "updatedAt": "2019-03-20T14:30:37.483Z",
}invite.get
invite.getRetrieves the invite of the given code.
Example:
Request
await slyk.invite.get('447fcf25-4e70-47a0-a2ad-a8f0aadf5a91');Response
{
  "code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "expiredAt": "2019-04-20T14:30:37.483Z",
  "invitedEmail": "[email protected]",
  "invitedUserId": null,
  "inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
  "status": "pending",
  "updatedAt": "2019-03-20T14:30:37.483Z",
}invite.list
invite.listRetrieves a list of invites.
Example:
Request
await slyk.invite.list({
  page: { size: 2 },
  sort: [{ direction: 'desc', name: 'code' }],
  filter: { invitedEmail: '[email protected]' }
});Response
{
  "results": [{
    "code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "expiredAt": "2019-04-20T14:30:37.483Z",
    "invitedEmail": "[email protected]",
    "invitedUserId": null,
    "inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
    "status": "pending",
    "updatedAt": "2019-03-20T14:30:37.483Z",
  },
  {
    "code": "06b989b9-8808-4615-95ed-da6c15b945d2",
    "createdAt": "2019-01-20T14:30:37.483Z",
    "expiredAt": "2019-02-20T14:30:37.483Z",
    "invitedEmail": "[email protected]",
    "invitedUserId": null,
    "inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
    "status": "expired",
    "updatedAt": "2019-03-20T14:30:37.483Z",
  }],
  "total": 32
}invite.send
invite.sendCreates and sends a one or multiples invite.
Example:
Request
await slyk.invite.send({
  email: ['[email protected]', '[email protected]'],
  inviterUserId: '26b7d8c3-d21c-420b-9820-9e8b822b90d2'
});Response
trueinvite.validate
invite.validateValidates the invite with the given code.
Example:
Request
await slyk.invite.validate('06b989b9-8808-4615-95ed-da6c15b945d2');Response
{ "referrerName": "corge" }Movement
The result of each one of the following movement methods return one or an array of Movement objects that include the following methods:
getAsset: Returns theassetof themovementassetCode.getData: Returns themovementdetails.getWallet: Returns thewalletof themovementwalletId.getTransaction: Returns thetransactionof themovementtransactionId.
movement.get
movement.getReturns the movement of the given id.
Example:
Request
await slyk.movement.get('09900e6e-991e-43bd-9b82-0641f648c1d1');Response
{
  "amount": "4.50000000",
  "assetCode": "garply",
  "code": "deposit",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
  "transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
}movement.list
movement.listRetrieves a list of movements.
Example:
Request
await slyk.movement.list({
  inlcude: 'transaction',
  page: { size: 2 },
  filter: { walletId: '703d8c69-d8fc-4e02-a7c9-42340ef07727' }
});Response
{
  "results": [{
    "amount": "4.50000000",
    "assetCode": "eth",
    "code": "deposit",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
    "transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
    "transaction": {
      "amount": "4.50000000",
      "assetCode": "eth",
      "code": "internal",
      "createdAt": "2019-03-20T14:30:37.483Z",
      "description": null,
      "destinationAddress": null,
      "destinationWalletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727",
      "externalId": null,
      "id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
      "metadata": {},
      "originAddress": null,
      "originWalletId": null,
      "status": "completed",
      "type": "deposit",
      "updatedAt": "2019-03-20T14:30:37.483Z"
    },
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
  },
  {
    "amount": "-0.50000000",
    "assetCode": "eth",
    "code": "withdrawal",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
    "transactionId": "a3293366-0d4c-4f83-8f71-84fe0b7dda99",
    "transaction": {
      "amount": "4.50000000",
      "assetCode": "eth",
      "code": "internal",
      "createdAt": "2019-03-20T14:30:37.483Z",
      "description": null,
      "destinationAddress": null,
      "destinationWalletId": null,
      "externalId": null,
      "id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
      "metadata": {},
      "originAddress": null,
      "originWalletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727",
      "status": "completed",
      "type": "withdrawal",
      "updatedAt": "2019-03-20T14:30:37.483Z"
    },
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
  }],
  "total": 4
}Payment Method
paymentMethod.get
paymentMethod.getReturns the paymentMethod of the given slug.
getData: Returns thepaymentMethoddetails.
Example:
Request
await slyk.paymentMethod.get('paypal');Response
{
  "assets": ["eur", "usd"],
  "capabilities": ["deposit"],
  "createdAt": "2019-03-20T14:30:37.483Z",
  "enabled": true,
  "features": ["apm"],
  "metadata": {
    "clientId": "client-id",
    "secret": "12345*****"
  },
  "name": "Paypal",
  "slug": "paypal"
}paymentMethod.list
paymentMethod.listRetrieves a list of paymentMethod.
Example:
Request
await slyk.movement.list({ filter: { enabled: true } });Response
{
  "results": [{
    "assets": ["eur", "usd"],
    "capabilities": ["deposit"],
    "createdAt": "2019-03-20T14:30:37.483Z",
    "enabled": true,
    "features": ["apm"],
    "metadata": {
      "clientId": "client-id",
      "secret": "12345*****"
    },
    "name": "Paypal",
    "slug": "paypal"
  },
  {
    "assets": ["eur", "usd"],
    "capabilities": ["deposit"],
    "createdAt": "2019-03-20T14:30:37.483Z",
    "enabled": true,
    "features": ["apm"],
    "metadata": {
      "apiPublishableKey": "api-publishable-key",
      "apiSecretKey": "12345*****"
    },
    "name": "Stripe",
    "slug": "stripe"
  }],
  "total": 4
}Rate
The result of each one of the following rate methods return one or an array of Rate objects that include the following methods:
getBaseAsset: Returns theassetof theratebaseAssetCode.getData: Returns theratedetails.getQuoteAsset: Returns theassetof theratequoteAssetCode.patch: Patches therate.
rate.create
rate.createCreates a new rate.
Example:
Request
await slyk.rate.create({
  baseAssetCode: 'btc',
  quoteAssetCode: 'usd',
  rate: '6649.88'
});Response
{
  "baseAssetCode": "btc",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "metadata": {},
  "quoteAssetCode": "usd",
  "rate": "6649.88000000",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}rate.delete
rate.deleteDeletes the rate of the given baseAssetCode and quoteAssetCode.
Example:
Request
await slyk.rate.delete('btc', 'usd');Response
truerate.get
rate.getRetrieves the rate of the given baseAssetCode and quoteAssetCode.
Example:
Request
await slyk.rate.get('garply', 'eur');Response
{
  "baseAssetCode": "btc",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "metadata": {},
  "quoteAssetCode": "eur",
  "rate": "6079.25000000",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}rate.list
rate.listRetrieves a list of rates.
Example:
Request
await slyk.rate.list({ filter: { assetCode: 'btc' } });Response
{
  "results": [{
    "baseAssetCode": "btc",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "metadata": {},
    "quoteAssetCode": "eur",
    "rate": "6079.25000000",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "baseAssetCode": "btc",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "metadata": {},
    "quoteAssetCode": "usd",
    "rate": "6649.88000000",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 2
}rate.patch
rate.patchModifies the details the rate of the given baseAssetCode and quoteAssetCode.
Example:
Request
await slyk.rate.patch('eth', 'usd', { rate: '137.18' });Response
{
  "baseAssetCode": "eth",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "metadata": {},
  "quoteAssetCode": "usd",
  "rate": "137.18000000",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}Transaction
The result of each one of the following transaction methods return one or an array of Transaction objects that include the following methods:
approve: Approves thetransaction.confirm: Confirms thetransaction.fail: Fails thetransaction.getAsset: Returns theassetof thetransactionassetCode.getData: Returns thetransactiondetails.getDestinationAddress: Returns theaddressof thetransactiondestinationAddressif set.getDestinationWallet: Returns thewalletof thetransactiondestinationWalletIdif set.getOriginAddress: Returns theaddressof thetransactionoriginAddressif set.getOriginWallet: Returns thewalletof thetransactionoriginWalletIdif set.getMovements: Returns the relatedmovements.reject: Rejects thetransaction.
transaction.approve
transaction.approveApproves the transaction of the given id.
Example:
Request
await slyk.transaction.approve('43563311-ab16-4499-95d2-30d9e06ba159');Response
{
  "amount": "5.00000000",
  "assetCode": "eth",
  "code": "internal",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": null,
  "externalId": null,
  "externalReference": null,
  "id": "43563311-ab16-4499-95d2-30d9e06ba159",
  "metadata": {},
  "originAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
  "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "processedAt": null,
  "reference": null,
  "status": "processing",
  "type": "withdrawal",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.confirm
transaction.confirmConfirms the transaction of the given id.
Example:
Request
await slyk.transaction.confirm('43563311-ab16-4499-95d2-30d9e06ba159');Response
{
  "amount": "5.00000000",
  "assetCode": "eth",
  "code": "internal",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": null,
  "externalId": null,
  "externalReference": null,
  "id": "43563311-ab16-4499-95d2-30d9e06ba159",
  "metadata": {},
  "originAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
  "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "processedAt": null,
  "reference": null,
  "status": "completed",
  "type": "withdrawal",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.deposit
transaction.depositCreates a new deposit transaction.
Example:
Request
await slyk.transaction.deposit({
  amount: '25.5',
  assetCode: 'bar',
  code: 'internal',
  destinationWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711'
});Response
{
  "amount": "25.50000000",
  "assetCode": "bar",
  "code": "internal",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "externalId": null,
  "externalReference": null,
  "id": "3110c2e3-28c6-463f-a69b-174527eabd70",
  "metadata": {},
  "originAddress": null,
  "originWalletId": null,
  "processedAt": null,
  "reference": null,
  "status": "pending",
  "type": "deposit",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.fail
transaction.failFails the transaction of the given id.
Example:
Request
await slyk.transaction.fail('3110c2e3-28c6-463f-a69b-174527eabd70', { reason: 'Wrong amount.' });Response
{
  "amount": "25.50000000",
  "assetCode": "bar",
  "code": "internal",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "externalId": null,
  "externalReference": null,
  "id": "3110c2e3-28c6-463f-a69b-174527eabd70",
  "metadata": { "failReason": "Wrong amount." },
  "originAddress": null,
  "originWalletId": null,
  "processedAt": null,
  "reference": null,
  "status": "failed",
  "type": "deposit",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.get
transaction.getReturns the transaction of the given id.
Example:
Request
await slyk.transaction.get('a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5');Response
{
  "amount": "0.50000000",
  "assetCode": "eth",
  "code": "crypto:coinbase",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
  "destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "externalId": null,
  "externalReference": null,
  "id": "a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5",
  "metadata": {},
  "originAddress": null,
  "originWalletId": null,
  "processedAt": null,
  "reference": null,
  "status": "pending",
  "type": "deposit",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.list
transaction.listRetrieves a list of transactions.
Example:
Request
await slyk.movement.list({ filter: { walletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711' } });Response
{
  "results": [{
    "amount": "0.50000000",
    "assetCode": "eth",
    "code": "crypto:coinbase",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "description": null,
    "destinationAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
    "destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
    "externalId": null,
    "externalReference": null,
    "id": "a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5",
    "metadata": {},
    "originAddress": null,
    "originWalletId": null,
    "processedAt": null,
    "reference": null,
    "status": "pending",
    "type": "deposit",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "amount": "250.00000000",
    "assetCode": "usd",
    "code": "bank:wire",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": null,
    "externalId": null,
    "externalReference": null,
    "id": "43563311-ab16-4499-95d2-30d9e06ba159",
    "metadata": {},
    "originAddress": null,
    "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
    "processedAt": null,
    "reference": null,
    "status": "pending",
    "type": "withdrawal",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 2
}transaction.pay
transaction.payCreates a new pay transaction.
Example:
Request
await slyk.transaction.pay({
  amount: '0.05',
  assetCode: 'eth',
  originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711'
});Response
{
  "amount": "0.05000000",
  "assetCode": "eth",
  "code": "internal:pay",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": "c4004a9d-6f2a-47b5-8c1e-d6349951ad05",
  "externalId": null,
  "externalReference": null,
  "id": "43563311-ab16-4499-95d2-30d9e06ba159",
  "metadata": {},
  "originAddress": null,
  "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "processedAt": null,
  "reference": null,
  "status": "pending",
  "type": "transfer",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.reject
transaction.rejectRejects the transaction of the given id.
Example:
Request
await slyk.transaction.reject('77d3a33c-89ed-4e1b-afd3-f726a0a3430a', { reason: { qux: 'quux' } });Response
{
  "amount": "175.00000000",
  "assetCode": "eur",
  "code": "bank:wire",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": null,
  "externalId": null,
  "externalReference": null,
  "id": "77d3a33c-89ed-4e1b-afd3-f726a0a3430a",
  "metadata": { "rejectReason": { "qux": "quux" } },
  "originAddress": null,
  "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "processedAt": null,
  "reference": null,
  "status": "rejected",
  "type": "withdrawal",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.transfer
transaction.transferCreates a new transfer transaction.
Example:
Request
await slyk.transaction.transfer({
  amount: '0.5',
  assetCode: 'eth',
  code: 'internal',
  commit: true,
  destinationWalletId: 'ab7970fb-a1a9-456e-a6b2-1fedfba2247b',
  originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711',
});Response
{
  "amount": "0.50000000",
  "assetCode": "eth",
  "code": "internal",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": "ab7970fb-a1a9-456e-a6b2-1fedfba2247b",
  "externalId": null,
  "externalReference": null,
  "id": "43563311-ab16-4499-95d2-30d9e06ba159",
  "metadata": {},
  "originAddress": null,
  "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "processedAt": null,
  "reference": null,
  "status": "pending",
  "type": "transfer",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}transaction.withdrawal
transaction.withdrawalCreates a new withdrawal transaction.
Example:
Request
await slyk.transaction.withdrawal({
  amount: '200',
  assetCode: 'eur',
  code: 'bank:wire',
  commit: true,
  originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711',
});Response
{
  "amount": "200.00000000",
  "assetCode": "eur",
  "code": "bank:wire",
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "description": null,
  "destinationAddress": null,
  "destinationWalletId": null,
  "externalId": null,
  "externalReference": null,
  "id": "43563311-ab16-4499-95d2-30d9e06ba159",
  "metadata": {},
  "originAddress": null,
  "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
  "processedAt": null,
  "reference": null,
  "status": "pending",
  "type": "withdrawal",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}User
The result of each one of the following user methods return one or an array of User objects that include the following methods:
approve: Approves theuser.block: Blocks theuser.changePassword: Changes theuserthe password.getData: Returns theuserdetails.getInvites: Returns theinvitesof theuser.getWallets: Returns thewalletsof theuser.getPrimaryWallet: Returns thewalletof theuserprimaryWalletId.getReferralUser: Returns theuserof theuserreferralUserIdif set.patch: Patches theuser.unblock: Unblocks theuser.
user.approve
user.approveApproves the user of the given id.
Example:
Request
await slyk.user.approve('5e101529-fa30-4415-9945-6540e70c4483');Response
{
  "approved": true,
  "blocked": false,
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": { "qux": "quux" },
  "email": "[email protected]",
  "id": "5e101529-fa30-4415-9945-6540e70c4483",
  "locale": "en-us",
  "name": "foobar",
  "phone": null,
  "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
  "referralCode": "XYZZY",
  "referralUserId": null,
  "roles": ["user"],
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "verified": false
}user.block
user.blockBlocks the user of the given id.
Example:
Request
await slyk.user.block('5e101529-fa30-4415-9945-6540e70c4483');Response
{
  "approved": false,
  "blocked": true,
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": { "qux": "quux" },
  "email": "[email protected]",
  "id": "5e101529-fa30-4415-9945-6540e70c4483",
  "locale": "en-us",
  "name": "foobar",
  "phone": null,
  "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
  "referralCode": "XYZZY",
  "referralUserId": null,
  "roles": ["user"],
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "verified": false
}user.changePassword
user.changePasswordChanges the user password.
Example:
Request
await slyk.user.changePassword('5e101529-fa30-4415-9945-6540e70c4483', { password: 'waldo' });Response
trueuser.create
user.createCreates a new user.
Example:
Request
await slyk.user.create({ email: '[email protected]', password: 'waldo' });Response
{
  "approved": false,
  "blocked": false,
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "email": "[email protected]",
  "id": "5e101529-fa30-4415-9945-6540e70c4483",
  "locale": "en-us",
  "name": "foobar",
  "phone": null,
  "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
  "referralCode": "XYZZY",
  "referralUserId": null,
  "roles": ["user"],
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "verified": false
}user.get
user.getReturns the user of the given id.
Example:
Request
await slyk.user.get('5e101529-fa30-4415-9945-6540e70c4483');Response
{
  "approved": false,
  "blocked": false,
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "email": "[email protected]",
  "id": "5e101529-fa30-4415-9945-6540e70c4483",
  "locale": "en-us",
  "name": "foobar",
  "phone": null,
  "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
  "referralCode": "XYZZY",
  "referralUserId": null,
  "roles": ["user"],
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "verified": false
}user.list
user.listRetrieves a list of user.
Example:
Request
await slyk.user.list({ filter: { name: 'foo' } });Response
{
  "results": [{
    "approved": false,
    "blocked": false,
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "email": "[email protected]",
    "id": "5e101529-fa30-4415-9945-6540e70c4483",
    "locale": "en-us",
    "name": "foobar",
    "phone": null,
    "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
    "referralCode": "XYZZY",
    "referralUserId": null,
    "roles": ["user"],
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "verified": false
  },
  {
    "approved": false,
    "blocked": false,
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "email": "[email protected]",
    "id": "6173fe23-1442-4003-bc4d-d18f5f42c024",
    "locale": "en-us",
    "name": "foobiz",
    "phone": null,
    "primaryWalletId": "a12fb051-9e36-441a-82b8-90f7813c5504",
    "referralCode": "XYZZY",
    "referralUserId": null,
    "roles": ["user"],
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "verified": false
  }],
  "total": 2
}user.patch
user.patchPatches the details of the user of the given id.
Example:
Request
await slyk.user.patch('5e101529-fa30-4415-9945-6540e70c4483', { name: 'corge' });Response
{
  "approved": false,
  "blocked": false,
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "email": "[email protected]",
  "id": "5e101529-fa30-4415-9945-6540e70c4483",
  "locale": "en-us",
  "name": "corge",
  "phone": null,
  "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
  "referralCode": "XYZZY",
  "referralUserId": null,
  "roles": ["user"],
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "verified": false
}user.unblock
user.unblockUnblocks the user of the given id.
Example:
Request
await slyk.user.unblock('5e101529-fa30-4415-9945-6540e70c4483');Response
{
  "approved": false,
  "blocked": false,
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": { "qux": "quux" },
  "email": "[email protected]",
  "id": "5e101529-fa30-4415-9945-6540e70c4483",
  "locale": "en-us",
  "name": "foobar",
  "phone": null,
  "primaryWalletId": "6c455aa8-c714-4441-97a8-0739fe387a67",
  "referralCode": "XYZZY",
  "referralUserId": null,
  "roles": ["user"],
  "updatedAt": "2019-03-20T14:30:37.483Z",
  "verified": false
}Wallet
The result of each one of the following wallet methods return one or an array of Wallet objects that include the following methods:
getActivity: Returns theactivity.getBalance: Returns thebalance.getData: Returns thewalletdetails.getMovements: Returns themovements.getTransactions: Returns thetransactions.getOwner: Returns theuserof thewalletownerId.patch: Patches thewallet.
wallet.activity
wallet.activityReturns the activity of the wallet of the given id.
Example:
Request
await slyk.wallet.activity('2d9b72c5-fbb2-45f1-8591-329c2a014c43', { page: { number: 2, size: 2 } });Response
{
  "results": [{
    "amount": "5.00000000",
    "assetCode": "garply",
    "code": "internal",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
    "externalId": null,
    "externalReference": null,
    "id": "43563311-ab16-4499-95d2-30d9e06ba159",
    "metadata": {},
    "originAddress": null,
    "originWalletId": null,
    "processedAt": null,
    "reference": null,
    "status": "completed",
    "type": "deposit",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "amount": "2.50000000",
    "assetCode": "garply",
    "code": "bank:wire",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": null,
    "externalId": null,
    "externalReference": null,
    "id": "43563311-ab16-4499-95d2-30d9e06ba159",
    "metadata": {},
    "originAddress": null,
    "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
    "processedAt": null,
    "reference": null,
    "status": "processing",
    "type": "withdrawal",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 5
}wallet.balance
wallet.balanceReturns the balance of the wallet of the given id.
Example:
Request
await slyk.wallet.balance('2d9b72c5-fbb2-45f1-8591-329c2a014c43', { filter: { assetCode: 'in:garply,corge' } });Response
[
  { "amount": "2.50000000", "assetCode": "coreg" },
  { "amount": "0.50000000", "assetCode": "garply" }
]wallet.create
wallet.createCreates a new wallet.
Example:
Request
await slyk.wallet.create({ ownerId: '0adb8aa9-6232-48f2-8faa-d9289e9134b9' });Response
{
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "id": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
  "locked": false,
  "metadata": {},
  "name": null,
  "ownerId": null,
  "reference": "XYZZY",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}wallet.get
wallet.getReturns the wallet of the given id.
Example:
Request
await slyk.wallet.get('4b1a22bf-642c-4c4f-bfb4-678e59121e74');Response
{
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": {},
  "id": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
  "locked": false,
  "metadata": {},
  "name": null,
  "ownerId": null,
  "reference": "XYZZY",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}wallet.globalActivity
wallet.globalActivityReturns the globalActivity.
Example:
Request
await slyk.wallet.globalActivity({ page: { number: 2, size: 2 } });Response
{
  "results": [{
    "amount": "5.00000000",
    "assetCode": "garply",
    "code": "internal",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
    "externalId": null,
    "externalReference": null,
    "id": "43563311-ab16-4499-95d2-30d9e06ba159",
    "metadata": {},
    "originAddress": null,
    "originWalletId": null,
    "processedAt": null,
    "reference": null,
    "status": "completed",
    "type": "deposit",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "amount": "2.50000000",
    "assetCode": "garply",
    "code": "bank:wire",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": null,
    "externalId": null,
    "externalReference": null,
    "id": "43563311-ab16-4499-95d2-30d9e06ba159",
    "metadata": {},
    "originAddress": null,
    "originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
    "processedAt": null,
    "reference": null,
    "status": "processing",
    "type": "withdrawal",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 5
}wallet.globalBalance
wallet.globalBalanceReturns the globalBalance.
Example:
Request
await slyk.wallet.globalBalance({ filter: { assetCode: 'in:garply,corge' } });Response
[
  { "amount": "20.00000000", "assetCode": "coreg" },
  { "amount": "15.50000000", "assetCode": "garply" }
]wallet.list
wallet.listReturns a list wallet.
Example:
Request
await slyk.wallet.list({ filter: { locked: true } });Response
{
  "results": [{
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "id": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
    "locked": true,
    "metadata": {},
    "name": null,
    "ownerId": null,
    "reference": "XYZZY",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "createdAt": "2019-03-20T14:30:37.483Z",
    "customData": {},
    "id": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
    "locked": true,
    "metadata": {},
    "name": null,
    "ownerId": null,
    "reference": "WALDO",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 2
}wallet.movements
wallet.movementsReturns the movments of the wallet of the given id.
Example:
Request
await slyk.wallet.movements('4b1a22bf-642c-4c4f-bfb4-678e59121e74', { include: 'transaction' });Response
{
  "results": [{
    "amount": "4.50000000",
    "assetCode": "garply",
    "code": "deposit",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
    "transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
    "transaction": {
      "amount": "4.50000000",
      "assetCode": "garply",
      "code": "internal",
      "createdAt": "2019-03-20T14:30:37.483Z",
      "description": null,
      "destinationAddress": null,
      "destinationWalletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
      "externalId": null,
      "id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
      "metadata": {},
      "originAddress": null,
      "originWalletId": null,
      "status": "completed",
      "type": "deposit",
      "updatedAt": "2019-03-20T14:30:37.483Z"
    },
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "walletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74"
  },
  {
    "amount": "-0.50000000",
    "assetCode": "garply",
    "code": "withdrawal",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
    "transactionId": "a3293366-0d4c-4f83-8f71-84fe0b7dda99",
    "transaction": {
      "amount": "4.50000000",
      "assetCode": "garply",
      "code": "internal",
      "createdAt": "2019-03-20T14:30:37.483Z",
      "description": null,
      "destinationAddress": null,
      "destinationWalletId": null,
      "externalId": null,
      "id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
      "metadata": {},
      "originAddress": null,
      "originWalletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
      "status": "completed",
      "type": "withdrawal",
      "updatedAt": "2019-03-20T14:30:37.483Z"
    },
    "updatedAt": "2019-03-20T14:30:37.483Z",
    "walletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74"
  }],
  "total": 2
}wallet.patch
wallet.patchPatches the details of the wallet of the given id.
Example:
Request
await slyk.wallet.patch('4b1a22bf-642c-4c4f-bfb4-678e59121e74', { customData: { qux: 'quux' }, name: 'corge' });Response
{
  "createdAt": "2019-03-20T14:30:37.483Z",
  "customData": { "qux": "quux" },
  "id": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
  "locked": true,
  "metadata": {},
  "name": "corge",
  "ownerId": null,
  "reference": "XYZZY",
  "updatedAt": "2019-03-20T14:30:37.483Z"
}wallet.transactions
wallet.transactionsReturns the transactions of the wallet of the given id.
Example:
Request
await slyk.wallet.transactions('4b1a22bf-642c-4c4f-bfb4-678e59121e74';Response
{
  "results": [{
    "amount": "4.50000000",
    "assetCode": "garply",
    "code": "internal",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
    "externalId": null,
    "id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
    "metadata": {},
    "originAddress": null,
    "originWalletId": null,
    "status": "completed",
    "type": "deposit",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  },
  {
    "amount": "4.50000000",
    "assetCode": "garply",
    "code": "internal",
    "createdAt": "2019-03-20T14:30:37.483Z",
    "description": null,
    "destinationAddress": null,
    "destinationWalletId": null,
    "externalId": null,
    "id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
    "metadata": {},
    "originAddress": null,
    "originWalletId": "4b1a22bf-642c-4c4f-bfb4-678e59121e74",
    "status": "completed",
    "type": "withdrawal",
    "updatedAt": "2019-03-20T14:30:37.483Z"
  }],
  "total": 2
}Last updated
Was this helpful?