# Server SDK (Node.js)

* [Install](/slyk/developing-with-slyk/sdks/server-sdk.md#install)
* [Usage](/slyk/developing-with-slyk/sdks/server-sdk.md#usage)
* [Methods](/slyk/developing-with-slyk/sdks/server-sdk/methods.md)
* [Github Repository](https://github.com/slykio/slyk-sdk-node/)

### Install

```
$ yarn add @slyk/slyk-sdk-node
```

The `slyk-sdk-node` requires node **v4** or higher.

### Usage

#### Example

```javascript
const slykSDK = require('@slyk/slyk-sdk-node');

(function() {
  const slyk = slykSDK({ apikey: 'api-key' });

  slyk.wallet.get('8399340e-8c1f-4c4f-94e0-81a5ee0378e1')
    .then(function(wallet) {
      wallet.getBalance({ filter: { assetCode: 'in:btc,usd' } })
        .then(function(balance) {
          console.log(balance);
        });
    });
})();
```

#### ES8 Example

```javascript
import slykSDK from '@slyk/slyk-sdk-node';

(async () => {
  const slyk = slykSDK({ apikey: 'api-key' });
  const wallet = await slyk.wallet.get('8399340e-8c1f-4c4f-94e0-81a5ee0378e1');
  const balance = await wallet.getBalance({ filter: { assetCode: 'in:btc,usd' } });

  console.log(balance);
})();
```

#### Result

```javascript
[
  { "amount": "0.50000000", "assetCode": "btc" },
  { "amount": "25.50000000", "assetCode": "usd" }
]
```

##


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.slyk.io/slyk/developing-with-slyk/sdks/server-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
