# Affiliate

## GET Affiliate Info

{% hint style="info" %}
Please refer to the official BloFin API Docs for the Required parameters.

<https://docs.blofin.com/index.html#get-affiliate-info>
{% endhint %}

#### Function Name:

```javascript
getAffiliateInfo()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBlofinExchange  = createExchange({
      exchange: "blofin",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "blofin"
  });

async function getAffiliateInfo(exchange, options) {
    try {
        let result = await exchange.getAffiliateInfo(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getAffiliateInfo(myBlofinExchange, 
});
```

## GET Referral Code

{% hint style="info" %}
Please refer to the official BloFin API Docs for the Required parameters.

<https://docs.blofin.com/index.html#get-referral-code>
{% endhint %}

#### Function Name:

```javascript
getReferralCode()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBlofinExchange  = createExchange({
      exchange: "blofin",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "blofin"
  });

async function getReferralCode(exchange, options) {
    try {
        let result = await exchange.getReferralCode(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getReferralCode(myBlofinExchange, 
});
```

## GET Direct Invitees

{% hint style="info" %}
Please refer to the official BloFin API Docs for the Required parameters.

<https://docs.blofin.com/index.html#get-direct-invitees>
{% endhint %}

#### Function Name:

```javascript
getDirectInvites()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBlofinExchange  = createExchange({
      exchange: "blofin",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "blofin"
  });

async function getDirectInvites(exchange, options) {
    try {
        let result = await exchange.getDirectInvites(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getDirectInvites(myBlofinExchange, 
});
```

## GET Sub Invitees

{% hint style="info" %}
Please refer to the official BloFin API Docs for the Required parameters.

<https://docs.blofin.com/index.html#get-sub-invitees>
{% endhint %}

#### Function Name:

```javascript
getSubInvitees()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBlofinExchange  = createExchange({
      exchange: "blofin",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "blofin"
  });

async function getSubInvitees(exchange, options) {
    try {
        let result = await exchange.getSubInvitees(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getSubInvitees(myBlofinExchange, 
});
```

## GET Sub Affiliates

{% hint style="info" %}
Please refer to the official BloFin API Docs for the Required parameters.

<https://docs.blofin.com/index.html#get-sub-affiliates>
{% endhint %}

#### Function Name:

```javascript
getSubAffiliates()
```

#### Usage:

```javascript
import { createExchange } from "./exchanges/exchange.js";

   let myBlofinExchange  = createExchange({
      exchange: "blofin",
      authenticate: "true",
      key: "myKey",
      secret: "mySecret",
      passphrase: "myPassphrase",
      label: "blofin"
  });

async function getSubAffiliates(exchange, options) {
    try {
        let result = await exchange.getSubAffiliates(options);
        console.log(result);
    } catch (error) {
        console.log(error.message);
    }
}

let result = await getSubAffiliates(myBlofinExchange, 
});
```
