# NFT & Marketplace API

{% hint style="info" %}
We have made the OpenSea account information endpoint public. We understand that developers currently have an issue with fetching bio information for accounts, so we wanted to help out.
{% endhint %}

{% hint style="success" %}
The free API key's have a rate limit of 3 requests a second. If you're looking to upgrade plans, either join our discord or visit our store: [https://buy.felonsecurity.net](https://whop.com/felonsecurity/?accessPassId=pass_O9m9KLnWUNM4O)
{% endhint %}

### Obtaining An API Key

Visit the link, [HERE](https://api.felonsecurity.net/login). (api.felonsecurity.net/login).

This will ask you to login with discord, you can check exactly what you're giving us access to which is your username. We cannot do anything malicious with this, we only record: your username and discord ID.

{% hint style="info" %}
If you feel uncomfortable signing into your discord account, feel free to join our discord and create a ticket. We can always manually give you an API key.
{% endhint %}

{% embed url="<https://api.felonsecurity.net/login>" %}
If you need a refresher on your API key, just head to; <https://api.felonsecurity.net/dashboard>
{% endembed %}

After you login, you're good to use the following endpoint(s). Just include the header: "token" to authenticate your requests.

### NFT Account Endpoints

## Fetch Account Info

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/account/opensea/address=`

Fetch an accounts information, includes opensea bio.

#### Path Parameters

| Name                                      | Type | Description      |
| ----------------------------------------- | ---- | ---------------- |
| address<mark style="color:red;">\*</mark> |      | Ethereum address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{"status":0,"message":"Endpoint not found. If you believe this is an error, contact me on twitter: @carvethedegen."}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Account Trading History

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/account/trading/info/address=`

Fetches an address' NFT trading history.

#### Path Parameters

| Name                                      | Type   | Description      |
| ----------------------------------------- | ------ | ---------------- |
| address<mark style="color:red;">\*</mark> | String | Ethereum address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Tokens Owned

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/account/token/owns/address=&contractAddress=&count=&offset=&withMetadata=`

Fetches an address' owned tokens in a specific collection.

#### Path Parameters

| Name                                           | Type    | Description                            |
| ---------------------------------------------- | ------- | -------------------------------------- |
| address<mark style="color:red;">\*</mark>      | String  | Ethereum address                       |
| contractAddress                                | String  | Specific contract to check             |
| count<mark style="color:red;">\*</mark>        | Integer | Amount to fetch (between 1 and 100)    |
| offset<mark style="color:red;">\*</mark>       | Integer | Offset to use (must be greater than 0) |
| withMetadata<mark style="color:red;">\*</mark> | Boolean | Option to return token metadata        |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### NFT Collection Endpoints

## Collection Info

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/info/contractAddress=`

Fetches collection info, retrieves info from Opensea.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Collection Stats

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/stats/contractAddress=`

Fetches collection statistics, retrieves info from Opensea.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Collection Floor

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/floor/contractAddress=`

Fetches a collections floor, retrieves info from multiple marketplaces.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Collection Rankings

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/rankings/orderBy=&timeframe=&count=&offset=&marketplace=`

Fetch top collections by multiple statistics, on multiple different marketplaces.

#### Path Parameters

| Name                                          | Type    | Description                               |
| --------------------------------------------- | ------- | ----------------------------------------- |
| orderBy<mark style="color:red;">\*</mark>     | String  | Which statistic to order the rankings by. |
| timeframe<mark style="color:red;">\*</mark>   | String  | Timeframe for rankings.                   |
| count<mark style="color:red;">\*</mark>       | Integer | How many to display.                      |
| offset<mark style="color:red;">\*</mark>      | Integer | Offset to use.                            |
| marketplace<mark style="color:red;">\*</mark> | String  | Marketplace to fetch rankings from.       |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Owner Spread

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/ownerspread/contractAddress=`

Fetch the address list of all owners from a collection.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Mint Volume

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/mintvolume/contractAddress=`

Fetches a collections minting volume.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Compare Owners

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/collections/compareowners/contractAddressOne=&contractAddressTwo=`

Compare owners from two different collections.

#### Path Parameters

| Name                                                 | Type   | Description             |
| ---------------------------------------------------- | ------ | ----------------------- |
| contractAddressOne<mark style="color:red;">\*</mark> | String | First contract address  |
| contractAddressTwo<mark style="color:red;">\*</mark> | String | Second contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Token Endpoints

## Token Owner

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/token/owner/contractAddress=&tokenId=`

Fetches the owner of a specific token.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |
| tokenId<mark style="color:red;">\*</mark>         | String | Token ID         |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Token Info

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/token/info/contractAddress=&tokenId=`

Retrieves a token's owner.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |
| tokenId<mark style="color:red;">\*</mark>         | String | Token ID         |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

### Metadata Endpoints

## Token Metadata

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/metadata/contractAddress=&tokenId=`

Fetch a tokens metadata.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |
| tokenId<mark style="color:red;">\*</mark>         | String | Token ID         |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Collection Metadata Spread

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/metadata/spread/contractAddress=`

Fetch a collections metadata spread.

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

## Collection's Contract ABI (BETA)

<mark style="color:blue;">`GET`</mark> `https://api.felonsecurity.net/v1/nft/metadata/abi/contractAddress=`

Retrieves the ABI from a contract.&#x20;

#### Path Parameters

| Name                                              | Type   | Description      |
| ------------------------------------------------- | ------ | ---------------- |
| contractAddress<mark style="color:red;">\*</mark> | String | Contract address |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized " %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}
