Slyk
Search…
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 the asset of the address assetCode.
  • getData: Returns the address details.
  • getWallet: Returns the wallet of the address walletId if set.

address.create

Creates a new address.
Example:

Request

1
await slyk.address.create({
2
address: '1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp',
3
assetCode: 'btc',
4
walletId: '9afa8a2d-023a-4040-b591-c03077f43d23'
5
});
Copied!

Response

1
{
2
"address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
3
"assetCode": "btc",
4
"customData": {},
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"metadata": {},
7
"updatedAt": "2019-03-20T14:30:37.483Z",
8
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
9
}
Copied!

address.get

Retrieves the address of the given address.
Example:

Request

1
await slyk.address.get('1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp');
Copied!

Response

1
{
2
"address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
3
"assetCode": "btc",
4
"customData": {},
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"metadata": {},
7
"updatedAt": "2019-03-20T14:30:37.483Z",
8
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
9
}
Copied!

address.list

Retrieves a list of addresses.
Example:

Request

1
await slyk.address.list({
2
page: { size: 2 },
3
sort: [{ name: 'createdAt'}],
4
filter: { walletId: '9afa8a2d-023a-4040-b591-c03077f43d23' }
5
});
Copied!

Response

1
{
2
"results": [{
3
"address": "1AyzfnxYZPeqgS3j3L5vfnUTkxVZ3FhGMp",
4
"assetCode": "btc",
5
"customData": {},
6
"createdAt": "2019-03-20T14:30:37.483Z",
7
"metadata": {},
8
"updatedAt": "2019-03-20T14:30:37.483Z",
9
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
10
},
11
{
12
"address": "D7SrewuwiEFDtD69L336ADGf6EF2owohLg",
13
"assetCode": "doge",
14
"customData": {},
15
"createdAt": "2019-03-20T14:30:37.483Z",
16
"metadata": {},
17
"updatedAt": "2019-03-20T14:30:37.483Z",
18
"walletId": "9afa8a2d-023a-4040-b591-c03077f43d23"
19
}],
20
"total": 32
21
}
Copied!

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 the connection of the asset connectionId if set.
  • getData: Returns the asset details.
  • patch: Patches the asset.

asset.create

Creates a new asset.
Example:

Request

1
await slyk.asset.create({
2
code: 'bar',
3
name: 'Foobar Coin',
4
symbol: 'ƒ'
5
});
Copied!

Response

1
{
2
"code": "bar",
3
"connectionId": null,
4
"contract": {},
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"decimalPlaces": 8,
8
"enabled": false,
9
"logoUrl": null,
10
"metadata": {},
11
"name": "Foobar coin",
12
"symbol": "ƒ",
13
"system": false,
14
"type": "custom",
15
"updatedAt": "2019-03-20T14:30:37.483Z"
16
}
Copied!

asset.get

Retrieves the asset of the given code.
Example:

Request

1
await slyk.asset.get('bar');
Copied!

Response

1
{
2
"code": "bar",
3
"connectionId": null,
4
"contract": {},
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"decimalPlaces": 8,
8
"enabled": false,
9
"logoUrl": null,
10
"metadata": {},
11
"name": "Foobar coin",
12
"symbol": "ƒ",
13
"system": false,
14
"type": "custom",
15
"updatedAt": "2019-03-20T14:30:37.483Z"
16
}
Copied!

asset.list

Retrieves a list of assets.
Example:

Request

1
await slyk.asset.list({
2
page: { size: 2 },
3
sort: [{ direction: 'desc', name: 'code' }],
4
filter: { name: 'foo' }
5
});
Copied!

Response

1
{
2
"results": [{
3
"code": "bar",
4
"connectionId": null,
5
"contract": {},
6
"createdAt": "2019-03-20T14:30:37.483Z",
7
"customData": {},
8
"decimalPlaces": 8,
9
"enabled": false,
10
"logoUrl": null,
11
"metadata": {},
12
"name": "Foobar coin",
13
"symbol": "ƒ",
14
"system": false,
15
"type": "custom",
16
"updatedAt": "2019-03-20T14:30:37.483Z"
17
},
18
{
19
"code": "biz",
20
"connectionId": null,
21
"contract": {},
22
"createdAt": "2019-03-20T14:30:37.483Z",
23
"customData": {},
24
"decimalPlaces": 8,
25
"enabled": false,
26
"logoUrl": null,
27
"metadata": {},
28
"name": "Foobiz coin",
29
"symbol": "Ɓ",
30
"system": false,
31
"type": "custom",
32
"updatedAt": "2019-03-20T14:30:37.483Z"
33
}],
34
"total": 32
35
}
Copied!

asset.patch

Modifies the details the asset of the given code.
Example:

Request

1
await slyk.asset.patch('bar' { customData: { qux: 'quux' } });
Copied!

Response

1
{
2
"code": "bar",
3
"connectionId": null,
4
"contract": {},
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": { "qux": "quux" },
7
"decimalPlaces": 8,
8
"enabled": false,
9
"logoUrl": null,
10
"metadata": {},
11
"name": "Foobar coin",
12
"symbol": "ƒ",
13
"system": false,
14
"type": "custom",
15
"updatedAt": "2019-03-20T14:30:37.483Z"
16
}
Copied!

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 the invite.
  • getData: Returns the invite details.
  • getInvitedUser: Returns the user of the invite invitedUserId if set.
  • getInviterUser: Returns the user of the invite inviterUserId if set.
  • validate: Validates the invite.

invite.cancel

Cancels the invite of the given code.
Example:

Request

1
await slyk.invite.cancel('447fcf25-4e70-47a0-a2ad-a8f0aadf5a91');
Copied!

Response

1
true
Copied!

invite.create

Creates a new invite.
Example:

Request

1
await slyk.invite.create({
2
email: '[email protected]',
3
inviterUserId: '26b7d8c3-d21c-420b-9820-9e8b822b90d2'
4
});
Copied!

Response

1
{
2
"code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
3
"createdAt": "2019-03-20T14:30:37.483Z",
4
"expiredAt": "2019-04-20T14:30:37.483Z",
5
"invitedEmail": "[email protected]",
6
"invitedUserId": null,
7
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
8
"status": "pending",
9
"updatedAt": "2019-03-20T14:30:37.483Z",
10
}
Copied!

invite.get

Retrieves the invite of the given code.
Example:

Request

1
await slyk.invite.get('447fcf25-4e70-47a0-a2ad-a8f0aadf5a91');
Copied!

Response

1
{
2
"code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
3
"createdAt": "2019-03-20T14:30:37.483Z",
4
"expiredAt": "2019-04-20T14:30:37.483Z",
5
"invitedEmail": "[email protected]",
6
"invitedUserId": null,
7
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
8
"status": "pending",
9
"updatedAt": "2019-03-20T14:30:37.483Z",
10
}
Copied!

invite.list

Retrieves a list of invites.
Example:

Request

1
await slyk.invite.list({
2
page: { size: 2 },
3
sort: [{ direction: 'desc', name: 'code' }],
4
filter: { invitedEmail: '[email protected]' }
5
});
Copied!

Response

1
{
2
"results": [{
3
"code": "447fcf25-4e70-47a0-a2ad-a8f0aadf5a91",
4
"createdAt": "2019-03-20T14:30:37.483Z",
5
"expiredAt": "2019-04-20T14:30:37.483Z",
6
"invitedEmail": "[email protected]",
7
"invitedUserId": null,
8
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
9
"status": "pending",
10
"updatedAt": "2019-03-20T14:30:37.483Z",
11
},
12
{
13
"code": "06b989b9-8808-4615-95ed-da6c15b945d2",
14
"createdAt": "2019-01-20T14:30:37.483Z",
15
"expiredAt": "2019-02-20T14:30:37.483Z",
16
"invitedEmail": "[email protected]",
17
"invitedUserId": null,
18
"inviterUserId": "26b7d8c3-d21c-420b-9820-9e8b822b90d2",
19
"status": "expired",
20
"updatedAt": "2019-03-20T14:30:37.483Z",
21
}],
22
"total": 32
23
}
Copied!

invite.send

Creates and sends a one or multiples invite.
Example:

Request

1
await slyk.invite.send({
3
inviterUserId: '26b7d8c3-d21c-420b-9820-9e8b822b90d2'
4
});
Copied!

Response

1
true
Copied!

invite.validate

Validates the invite with the given code.
Example:

Request

1
await slyk.invite.validate('06b989b9-8808-4615-95ed-da6c15b945d2');
Copied!

Response

1
{ "referrerName": "corge" }
Copied!

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 the asset of the movement assetCode.
  • getData: Returns the movement details.
  • getWallet: Returns the wallet of the movement walletId.
  • getTransaction: Returns the transaction of the movement transactionId.

movement.get

Returns the movement of the given id.
Example:

Request

1
await slyk.movement.get('09900e6e-991e-43bd-9b82-0641f648c1d1');
Copied!

Response

1
{
2
"amount": "4.50000000",
3
"assetCode": "garply",
4
"code": "deposit",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
7
"transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
8
"updatedAt": "2019-03-20T14:30:37.483Z",
9
"walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
10
}
Copied!

movement.list

Retrieves a list of movements.
Example:

Request

1
await slyk.movement.list({
2
inlcude: 'transaction',
3
page: { size: 2 },
4
filter: { walletId: '703d8c69-d8fc-4e02-a7c9-42340ef07727' }
5
});
Copied!

Response

1
{
2
"results": [{
3
"amount": "4.50000000",
4
"assetCode": "eth",
5
"code": "deposit",
6
"createdAt": "2019-03-20T14:30:37.483Z",
7
"id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
8
"transactionId": "43563311-ab16-4499-95d2-30d9e06ba159",
9
"transaction": {
10
"amount": "4.50000000",
11
"assetCode": "eth",
12
"code": "internal",
13
"createdAt": "2019-03-20T14:30:37.483Z",
14
"description": null,
15
"destinationAddress": null,
16
"destinationWalletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727",
17
"externalId": null,
18
"id": "09900e6e-991e-43bd-9b82-0641f648c1d1",
19
"metadata": {},
20
"originAddress": null,
21
"originWalletId": null,
22
"status": "completed",
23
"type": "deposit",
24
"updatedAt": "2019-03-20T14:30:37.483Z"
25
},
26
"updatedAt": "2019-03-20T14:30:37.483Z",
27
"walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
28
},
29
{
30
"amount": "-0.50000000",
31
"assetCode": "eth",
32
"code": "withdrawal",
33
"createdAt": "2019-03-20T14:30:37.483Z",
34
"id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
35
"transactionId": "a3293366-0d4c-4f83-8f71-84fe0b7dda99",
36
"transaction": {
37
"amount": "4.50000000",
38
"assetCode": "eth",
39
"code": "internal",
40
"createdAt": "2019-03-20T14:30:37.483Z",
41
"description": null,
42
"destinationAddress": null,
43
"destinationWalletId": null,
44
"externalId": null,
45
"id": "b9fe22e5-2985-4814-8cb8-02e1cb581001",
46
"metadata": {},
47
"originAddress": null,
48
"originWalletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727",
49
"status": "completed",
50
"type": "withdrawal",
51
"updatedAt": "2019-03-20T14:30:37.483Z"
52
},
53
"updatedAt": "2019-03-20T14:30:37.483Z",
54
"walletId": "703d8c69-d8fc-4e02-a7c9-42340ef07727"
55
}],
56
"total": 4
57
}
Copied!

Payment Method

paymentMethod.get

Returns the paymentMethod of the given slug.
  • getData: Returns the paymentMethod details.
Example:

Request

1
await slyk.paymentMethod.get('paypal');
Copied!

Response

1
{
2
"assets": ["eur", "usd"],
3
"capabilities": ["deposit"],
4
"createdAt": "2019-03-20T14:30:37.483Z",
5
"enabled": true,
6
"features": ["apm"],
7
"metadata": {
8
"clientId": "client-id",
9
"secret": "12345*****"
10
},
11
"name": "Paypal",
12
"slug": "paypal"
13
}
Copied!

paymentMethod.list

Retrieves a list of paymentMethod.
Example:

Request

1
await slyk.movement.list({ filter: { enabled: true } });
Copied!

Response

1
{
2
"results": [{
3
"assets": ["eur", "usd"],
4
"capabilities": ["deposit"],
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"enabled": true,
7
"features": ["apm"],
8
"metadata": {
9
"clientId": "client-id",
10
"secret": "12345*****"
11
},
12
"name": "Paypal",
13
"slug": "paypal"
14
},
15
{
16
"assets": ["eur", "usd"],
17
"capabilities": ["deposit"],
18
"createdAt": "2019-03-20T14:30:37.483Z",
19
"enabled": true,
20
"features": ["apm"],
21
"metadata": {
22
"apiPublishableKey": "api-publishable-key",
23
"apiSecretKey": "12345*****"
24
},
25
"name": "Stripe",
26
"slug": "stripe"
27
}],
28
"total": 4
29
}
Copied!

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 the asset of the rate baseAssetCode.
  • getData: Returns the rate details.
  • getQuoteAsset: Returns the asset of the rate quoteAssetCode.
  • patch: Patches the rate.

rate.create

Creates a new rate.
Example:

Request

1
await slyk.rate.create({
2
baseAssetCode: 'btc',
3
quoteAssetCode: 'usd',
4
rate: '6649.88'
5
});
Copied!

Response

1
{
2
"baseAssetCode": "btc",
3
"createdAt": "2019-03-20T14:30:37.483Z",
4
"customData": {},
5
"metadata": {},
6
"quoteAssetCode": "usd",
7
"rate": "6649.88000000",
8
"updatedAt": "2019-03-20T14:30:37.483Z"
9
}
Copied!

rate.delete

Deletes the rate of the given baseAssetCode and quoteAssetCode.
Example:

Request

1
await slyk.rate.delete('btc', 'usd');
Copied!

Response

1
true
Copied!

rate.get

Retrieves the rate of the given baseAssetCode and quoteAssetCode.
Example:

Request

1
await slyk.rate.get('garply', 'eur');
Copied!

Response

1
{
2
"baseAssetCode": "btc",
3
"createdAt": "2019-03-20T14:30:37.483Z",
4
"customData": {},
5
"metadata": {},
6
"quoteAssetCode": "eur",
7
"rate": "6079.25000000",
8
"updatedAt": "2019-03-20T14:30:37.483Z"
9
}
Copied!

rate.list

Retrieves a list of rates.
Example:

Request

1
await slyk.rate.list({ filter: { assetCode: 'btc' } });
Copied!

Response

1
{
2
"results": [{
3
"baseAssetCode": "btc",
4
"createdAt": "2019-03-20T14:30:37.483Z",
5
"customData": {},
6
"metadata": {},
7
"quoteAssetCode": "eur",
8
"rate": "6079.25000000",
9
"updatedAt": "2019-03-20T14:30:37.483Z"
10
},
11
{
12
"baseAssetCode": "btc",
13
"createdAt": "2019-03-20T14:30:37.483Z",
14
"customData": {},
15
"metadata": {},
16
"quoteAssetCode": "usd",
17
"rate": "6649.88000000",
18
"updatedAt": "2019-03-20T14:30:37.483Z"
19
}],
20
"total": 2
21
}
Copied!

rate.patch

Modifies the details the rate of the given baseAssetCode and quoteAssetCode.
Example:

Request

1
await slyk.rate.patch('eth', 'usd', { rate: '137.18' });
Copied!

Response

1
{
2
"baseAssetCode": "eth",
3
"createdAt": "2019-03-20T14:30:37.483Z",
4
"customData": {},
5
"metadata": {},
6
"quoteAssetCode": "usd",
7
"rate": "137.18000000",
8
"updatedAt": "2019-03-20T14:30:37.483Z"
9
}
Copied!

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 the transaction.
  • confirm: Confirms the transaction.
  • fail: Fails the transaction.
  • getAsset: Returns the asset of the transaction assetCode.
  • getData: Returns the transaction details.
  • getDestinationAddress: Returns the address of the transaction destinationAddress if set.
  • getDestinationWallet: Returns the wallet of the transaction destinationWalletId if set.
  • getOriginAddress: Returns the address of the transaction originAddress if set.
  • getOriginWallet: Returns the wallet of the transaction originWalletId if set.
  • getMovements: Returns the related movements.
  • reject: Rejects the transaction.

transaction.approve

Approves the transaction of the given id.
Example:

Request

1
await slyk.transaction.approve('43563311-ab16-4499-95d2-30d9e06ba159');
Copied!

Response

1
{
2
"amount": "5.00000000",
3
"assetCode": "eth",
4
"code": "internal",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress": null,
9
"destinationWalletId": null,
10
"externalId": null,
11
"externalReference": null,
12
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
13
"metadata": {},
14
"originAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
15
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
16
"processedAt": null,
17
"reference": null,
18
"status": "processing",
19
"type": "withdrawal",
20
"updatedAt": "2019-03-20T14:30:37.483Z"
21
}
Copied!

transaction.confirm

Confirms the transaction of the given id.
Example:

Request

1
await slyk.transaction.confirm('43563311-ab16-4499-95d2-30d9e06ba159');
Copied!

Response

1
{
2
"amount": "5.00000000",
3
"assetCode": "eth",
4
"code": "internal",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress": null,
9
"destinationWalletId": null,
10
"externalId": null,
11
"externalReference": null,
12
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
13
"metadata": {},
14
"originAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
15
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
16
"processedAt": null,
17
"reference": null,
18
"status": "completed",
19
"type": "withdrawal",
20
"updatedAt": "2019-03-20T14:30:37.483Z"
21
}
Copied!

transaction.deposit

Creates a new deposit transaction.
Example:

Request

1
await slyk.transaction.deposit({
2
amount: '25.5',
3
assetCode: 'bar',
4
code: 'internal',
5
destinationWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711'
6
});
Copied!

Response

1
{
2
"amount": "25.50000000",
3
"assetCode": "bar",
4
"code": "internal",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress": null,
9
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
10
"externalId": null,
11
"externalReference": null,
12
"id": "3110c2e3-28c6-463f-a69b-174527eabd70",
13
"metadata": {},
14
"originAddress": null,
15
"originWalletId": null,
16
"processedAt": null,
17
"reference": null,
18
"status": "pending",
19
"type": "deposit",
20
"updatedAt": "2019-03-20T14:30:37.483Z"
21
}
Copied!

transaction.fail

Fails the transaction of the given id.
Example:

Request

1
await slyk.transaction.fail('3110c2e3-28c6-463f-a69b-174527eabd70', { reason: 'Wrong amount.' });
Copied!

Response

1
{
2
"amount": "25.50000000",
3
"assetCode": "bar",
4
"code": "internal",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress": null,
9
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
10
"externalId": null,
11
"externalReference": null,
12
"id": "3110c2e3-28c6-463f-a69b-174527eabd70",
13
"metadata": { "failReason": "Wrong amount." },
14
"originAddress": null,
15
"originWalletId": null,
16
"processedAt": null,
17
"reference": null,
18
"status": "failed",
19
"type": "deposit",
20
"updatedAt": "2019-03-20T14:30:37.483Z"
21
}
Copied!

transaction.get

Returns the transaction of the given id.
Example:

Request

1
await slyk.transaction.get('a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5');
Copied!

Response

1
{
2
"amount": "0.50000000",
3
"assetCode": "eth",
4
"code": "crypto:coinbase",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
9
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
10
"externalId": null,
11
"externalReference": null,
12
"id": "a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5",
13
"metadata": {},
14
"originAddress": null,
15
"originWalletId": null,
16
"processedAt": null,
17
"reference": null,
18
"status": "pending",
19
"type": "deposit",
20
"updatedAt": "2019-03-20T14:30:37.483Z"
21
}
Copied!

transaction.list

Retrieves a list of transactions.
Example:

Request

1
await slyk.movement.list({ filter: { walletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711' } });
Copied!

Response

1
{
2
"results": [{
3
"amount": "0.50000000",
4
"assetCode": "eth",
5
"code": "crypto:coinbase",
6
"createdAt": "2019-03-20T14:30:37.483Z",
7
"customData": {},
8
"description": null,
9
"destinationAddress": "0x1B8D75764ee27D06b131728412BfdF36f94dcbc1",
10
"destinationWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
11
"externalId": null,
12
"externalReference": null,
13
"id": "a33a1c4d-b4a1-4ea3-b57a-25b485b4e5a5",
14
"metadata": {},
15
"originAddress": null,
16
"originWalletId": null,
17
"processedAt": null,
18
"reference": null,
19
"status": "pending",
20
"type": "deposit",
21
"updatedAt": "2019-03-20T14:30:37.483Z"
22
},
23
{
24
"amount": "250.00000000",
25
"assetCode": "usd",
26
"code": "bank:wire",
27
"createdAt": "2019-03-20T14:30:37.483Z",
28
"customData": {},
29
"description": null,
30
"destinationAddress": null,
31
"destinationWalletId": null,
32
"externalId": null,
33
"externalReference": null,
34
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
35
"metadata": {},
36
"originAddress": null,
37
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
38
"processedAt": null,
39
"reference": null,
40
"status": "pending",
41
"type": "withdrawal",
42
"updatedAt": "2019-03-20T14:30:37.483Z"
43
}],
44
"total": 2
45
}
Copied!

transaction.pay

Creates a new pay transaction.
Example:

Request

1
await slyk.transaction.pay({
2
amount: '0.05',
3
assetCode: 'eth',
4
originWalletId: '1ef0452a-062c-45ce-aaf5-dd19e38c7711'
5
});
Copied!

Response

1
{
2
"amount": "0.05000000",
3
"assetCode": "eth",
4
"code": "internal:pay",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress": null,
9
"destinationWalletId": "c4004a9d-6f2a-47b5-8c1e-d6349951ad05",
10
"externalId": null,
11
"externalReference": null,
12
"id": "43563311-ab16-4499-95d2-30d9e06ba159",
13
"metadata": {},
14
"originAddress": null,
15
"originWalletId": "1ef0452a-062c-45ce-aaf5-dd19e38c7711",
16
"processedAt": null,
17
"reference": null,
18
"status": "pending",
19
"type": "transfer",
20
"updatedAt": "2019-03-20T14:30:37.483Z"
21
}
Copied!

transaction.reject

Rejects the transaction of the given id.
Example:

Request

1
await slyk.transaction.reject('77d3a33c-89ed-4e1b-afd3-f726a0a3430a', { reason: { qux: 'quux' } });
Copied!

Response

1
{
2
"amount": "175.00000000",
3
"assetCode": "eur",
4
"code": "bank:wire",
5
"createdAt": "2019-03-20T14:30:37.483Z",
6
"customData": {},
7
"description": null,
8
"destinationAddress"