# What is Tako?

Tako Protocol is a modular social protocol, it's inclusive, open, composable, dedicated to providing open and permissionless infrastructure for the decentralized social networks and the creator economy.

Tako Protocol will integrate data from various social platforms such as Farcaster, Twitter, and more, offering developers a convenient, unified development experience. It's like building with Lego blocks; we call it Social Lego. The flexible  APIs, SDKs, and various application development cases enable developers to participate in the construction of decentralized social networks and the creator economy with low entry barriers and high efficiency

<figure><img src="/files/FrQxAEP3cqH5PVDOMldX" alt=""><figcaption><p>Social Legos</p></figcaption></figure>

<figure><img src="/files/xRfd6LSnC9jUeGdp6A1k" alt=""><figcaption><p>Creator Economy</p></figcaption></figure>


# Social Abstract Account

## Social Abstract Account

The Tako Account is a Social Abstract Account. It serves as a gateway to the social world. With an account and our flexible components, you can create a variety of social apps, or connect existing social accounts, including Farcaster, Lens, Twitter, and more, to your account. Tako will provide you with a smooth and easy way to explore the social sphere.

## Register

The account can be quickly created through <https://tako.so> (in developing). You will receive a Tako ID, with which you can set your profile picture, username, and other information.

Tako provides an easy way to claim a Farcaster Account, no manual operation required, Tako will automatically handle all complex transactions.

Alternatively, you can connect an existing Farcaster Account. When using the Tako Client(in developing) to access Farcaster, there is no need for complex or insecure operations such as importing wallet private keys; only an email is required.

The account registration is gradually being opened, and we cordially invite you to join our waitlist!

## Development Resources

Tako's infrastructure is nearing completion. Please stay tuned for updates on Tako, including API, SDK, Contract, and more, which will be promptly updated in the documentation. We look forward to developers making use of them


# Social Legos

## Overview

Tako Protocol will integrate data from various social platforms such as Farcaster, Twitter, and more, offering developers a convenient, unified development experience. It's like building with Lego blocks; we call it Social Lego

## Social Legos

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/JjSaYoDYLb0gbMLHCzrD" %}
[On-Chain Reputation](/social-legos/on-chain-reputation)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/ynVE7FcDpSO2vAA989FR" %}
[Farcaster](/social-legos/farcaster)
{% endcontent-ref %}


# On-Chain Reputation

## On-Chain Reputation

On-chain Reputation is a type of credential, essentially composed of smart contracts. The core contract can be an ERC-721 NFT, an ERC-20 Token, or another type of token. It can be written in any mainstream programming language and deployed on any mainstream blockchain, all of which Tako can support.

## How does it work

The simplest form of On-Chain Reputation is to implement an ERC-721 NFT contract. If you have the Social Protocol or a Social APP, you can collaborate with Tako.

Tako will integrate your On-Chain Reputation Token and also support users in connecting to your protocol or app through Tako Connect. Tako is inclusive, open, and composable, allowing your protocol or app to seamlessly interact with Tako through On-Chain Reputation. When users mint On-Chain Reputation Tokens, they can receive incentives or support for engaging in more advanced social interactions and transactional behaviors.

Of course, this is the simplest practice; connecting with Tako can spark a variety of diverse ideas.

## Development Resource

Tako's infrastructure is nearing completion. Please stay tuned for updates on Tako, including API, SDK, Contract, and more, which will be promptly updated in the documentation. We look forward to developers making use of them


# Farcaster

## Farcaster Infrastructure

Tako maintains the Farcaster Hub and, after fetching data from the hub, has carried out extensive optimizations and expansions to provide a rich set of data interfaces. In addition to basic information streams such as Following and Trending, it also offers information streams optimized based on Localization, allowing developers' apps to be more user-centric.

## Development Resource

Tako's infrastructure is nearing completion. Please stay tuned for updates on Tako, including API, SDK, Contract, and more, which will be promptly updated in the documentation. We look forward to developers making use of them


# Monetization

## Overview

The docs will show you all the exposed APIs, how to use them, and what they will return.&#x20;

> ⚠️ WARNING: The Tako API and SDK is currently in beta version, so we may update it anytime and will not forward compatibility without warning or notice. Please exercise caution when using it. Once production is ready, we will remove the beta warning and issue an official announcement. After that, we arbitrarily ensure there are only changes if a significant difference to Tako itself is required.

We still use RESTful API because it is easy to start, but we also consider GraphQL, and you can use it in the future version.

Tako protocol has many technical points and needs to manage various data, and our backend does all the work for you. We have done many optimizations for fast fetching, and you will feel smooth when accessing the APIs.

We will continue working on APIs, including developing and improving old ones. Your applications will inherit all the improvements by using Tako APIs.

We hope you like it, and any feedback you have is hugely welcome.

## Modules

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/3pyIMNZBC7cDG8jzZyau" %}
[Profile as an asset](/monetization/profile-as-an-asset)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/A971zq3qnNavohhMMpXO" %}
[Open Curation](/monetization/open-curation)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/JBeWpSnaaSeiOvuAqJwQ" %}
[Peer-to-Peer Curation](/monetization/peer-to-peer-curation)
{% endcontent-ref %}


# Profile as an asset

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/taHFs6bskQg0qQrQS78n" %}
[Introduction](/monetization/profile-as-an-asset/introduction)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/PApLQmYDp8RTYm0qIuOv" %}
[API Overview](/monetization/profile-as-an-asset/api-overview)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/qsXBrPBWS0SRnFe7q7vp" %}
[For Farcaster dApp](/monetization/profile-as-an-asset/for-farcaster-dapp)
{% endcontent-ref %}


# Introduction

Every individual has a profile on social apps, which is an essential digital asset.&#x20;

By embracing the "profile-as-an-asset" concept, we can activate our profile key through contracts.

The key can be traded without matching buyers and sellers, with pricing determined by the contract and transactions executed directly by the contract.

If a user significantly influences their followers, many people will be interested in purchasing their profile key. As the circulation of the key increases, the key price will also rise, allowing both the issuer and holders of the key to profit from it.

You can integrate your application's functionalities related to "profile-as-an-asset" using APIs or contracts. And add more features to your app to attract users, such as establishing a chat community and airdropping rewards to traders.


# API Overview

## 1. API Base Link

### Based on Optimistic Mainnet

[https://api.tako.so](https://testapi.takoyaki.so/)

## 2. How To Use

### For GET Method API

Assume you will use the API GetLensCuratorAccepted. Its route is "/v2/lens/curator/accepted".

The first step you should compose the base link with the API route:

`https://api.tako.so/token/profile/v1/content/discover?ecosystem=farcaster`

Please refer to the API documentation for specific parameters and requirements.

Now, you can request the full link using JavaScript, Python, cURL, etc. Then, you will receive a response from the Tako server.

### For POST method API

Like the GET method, you must pass the parameters in the request body as application/json.

## 3. Rate Limit

The cumulative number of API accesses from the same IP address should not exceed <mark style="color:red;">**60 times per minute**</mark>.

## 4. Request Format

* GET method: All parameters are included in the URL.
* POST method: All parameters are formatted as JSON data and put in the request body.


# For Farcaster dApp

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/3mRT2H80G2AluvvknLre" %}
[Deployed Contract Address](/monetization/profile-as-an-asset/for-farcaster-dapp/deployed-contract-address)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/Gs4HrC7VR1DZhm5140gd" %}
[Contract Specification](/monetization/profile-as-an-asset/for-farcaster-dapp/contract-specification)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/rLR00ukAI9SrNBwt8tOY" %}
[APIs](/monetization/profile-as-an-asset/for-farcaster-dapp/apis)
{% endcontent-ref %}


# Deployed Contract Address

## 1. Optimistic Mainnet

The official block explorer can be found here:

[Optimistic Mainnet Block Explorer](https://optimistic.etherscan.io)

<table><thead><tr><th width="251">Contract</th><th>Address</th></tr></thead><tbody><tr><td>ProfileMarketV1</td><td><a href="https://optimistic.etherscan.io/address/0x6df43106f7a4ba0d1e9653eda49530333a6b2d98">0x6df43106f7a4ba0d1e9653eda49530333a6b2d98</a></td></tr><tr><td>FarcasterKey</td><td><a href="https://optimistic.etherscan.io/token/0x6ddd627b68aad3edf59bee544e62d70989ffbb65">0x6ddd627b68aad3edf59bee544e62d70989ffbb65</a></td></tr></tbody></table>


# Contract Specification

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/pTNaS9RbydSJTDu9uoAI" %}
[ProfileMarketV1](/monetization/profile-as-an-asset/for-farcaster-dapp/contract-specification/profilemarketv1)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/PuMJeUWmtHjtKv0CKmX5" %}
[FarcasterKey](/monetization/profile-as-an-asset/for-farcaster-dapp/contract-specification/farcasterkey)
{% endcontent-ref %}


# ProfileMarketV1

## setFeeDestination

Sets the destination address for protocol fees

`function setFeeDestination(address _feeDestination) external onlyOwner`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>_feeDestination</td><td>address</td><td>The address that receives the protocol fees</td></tr></tbody></table>

## setProtocolBuyFeePercent

Sets the buy fee percentage for the protocol

`function setProtocolBuyFeePercent(uint256 _feePercent) external onlyOwner`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>_feePercent</td><td>uint256</td><td>The fee percent. 0 - 100%</td></tr></tbody></table>

## setProtocolSellFeePercent

Sets the sell fee percentage for the protocol

`function setProtocolSellFeePercent(uint256 _feePercent) external onlyOwner`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>_feePercent</td><td>uint256</td><td>The fee percent. 0 - 100%</td></tr></tbody></table>

## setCreatorBuyFeePercent

Sets the buy fee percentage for the creator

`function setCreatorBuyFeePercent(uint256 _feePercent) external onlyOwner`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>_feePercent</td><td>uint256</td><td>The fee percent. 0 - 100%</td></tr></tbody></table>

## setCreatorSellFeePercent

Sets the sell fee percentage for the creator

`function setCreatorSellFeePercent(uint256 _feePercent) external onlyOwner`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>_feePercent</td><td>uint256</td><td>The fee percent. 0 - 100%</td></tr></tbody></table>

## setOpenInit

Opens oc closes the platform for shares issuance

`function setOpenInit(bool isOpen) external onlyOwner`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>isOpen</td><td>bool</td><td>true or false</td></tr></tbody></table>

## getBuyPrice

Retrieves the price for buying shares

`function getBuyPrice(uint256 creatorId, uint256 amount) external view`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>uint256</td><td>The Farcaster ID of creator</td></tr><tr><td>amount</td><td>uint256</td><td>The amount of Key buys</td></tr></tbody></table>

## getSellPrice

Retrieves the price for selling shares

`function getSellPrice( uint256 creatorId, uint256 amount ) external view`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>uint256</td><td>The Farcaster ID of creator</td></tr><tr><td>amount</td><td>uint256</td><td>The amount of Key sells</td></tr></tbody></table>

## createSharesForPiecewise

Allows a creator to issue shares with a piecewise pricing model

`function createSharesForPiecewise(uint256 creatorId, uint256 startPrice, uint256 initialSupply, uint256 totalSupply, uint256 a, uint256 b, bool signOfb, uint256 k, bool signOfk) public nonReentrant`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>uint256</td><td>The Farcaster ID of creator</td></tr><tr><td>startPrice</td><td>uint256</td><td>The amount of Key sells</td></tr><tr><td>initialSupply</td><td>uint256</td><td></td></tr><tr><td>totalSupply</td><td>uint256</td><td></td></tr><tr><td>a</td><td>uint256</td><td></td></tr><tr><td>b</td><td>uint256</td><td></td></tr><tr><td>signOfb</td><td>bool</td><td></td></tr><tr><td>k</td><td>uint256</td><td></td></tr><tr><td>signOfk</td><td>bool</td><td></td></tr></tbody></table>

## buyShares

Allows a user to buy shares

`function buyShares(uint256 creatorId, uint256 sharesAmount) public payable nonReentrant()`

## sellShare

Allows a user to sell a single share

`function sellShare(uint256 tokenId, uint256 priceLimit) external nonReentrant`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenId</td><td>uint256</td><td></td></tr><tr><td>priceLimit</td><td>uint256</td><td></td></tr></tbody></table>

## sellShares

Allows a user to sell multiple shares

`function sellShares(uint256[] memory tokenIds, uint256 priceLimit) external nonReentrant`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenIds</td><td>uint256[]</td><td></td></tr><tr><td>priceLimit</td><td>uint256</td><td></td></tr></tbody></table>

## claim

Allows a user to claim accumulated fees

`function claim() external nonReentrant`


# FarcasterKey

## creatorIdOf

Get the creatorId by token ID

`function creatorIdOf(uint256 tokenId) external view`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenId</td><td>uint256</td><td>the ID of NFT token</td></tr></tbody></table>

## creatorIdsOf

Similar to creatorIdOf(), supports batch operations

`function creatorIdsOf(uint256[] calldata tokenIds) external view`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenId</td><td>uint256</td><td>the ID of NFT token</td></tr></tbody></table>

## creatorIdsOfOwner

Get the creatorIds by owner address

`function creatorIdsOfOwner(address tokenOwner) external view`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenOwner</td><td>address</td><td>the owner's address</td></tr></tbody></table>

## Mint

Mint the Profile Key NFT

`function mint(address to, uint256 amount, uint256 creatorId) external onlyFarcasterKeys`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>to</td><td>address</td><td>The address that receives the NFTs</td></tr><tr><td>amount</td><td>uint256</td><td>The amount of Minted NFTs</td></tr><tr><td>creatorId</td><td>uint256</td><td>The creator's Farcaster ID</td></tr></tbody></table>

## Burn

Burn the profile Key NFT

`function burn(uint256 tokenId) external onlyFarcasterKeys`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>tokenId</td><td>uint256</td><td>the ID of the profile key NFT</td></tr></tbody></table>

## totalMinted

Get the amount of minted NFTs

`function totalMinted() external view`

## totalBurned

Get the amount of burned NFTs

`function totalBurned() external view`

## setBaseURI

Set the base image URI of NFT

`function setBaseURI(string memory newBasURI) external onlyOwner`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>newBasURI</code></td><td>string</td><td>The image URI</td></tr></tbody></table>


# APIs

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/J9KYsiVCbOOW84Wl0Rgr" %}
[GetBuyPrice](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getbuyprice)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/7lxAGd0u70M0Df9r0L56" %}
[GetBuyPriceAfterFee](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getbuypriceafterfee)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/DVhE4IS1OEAC8vnkkyMv" %}
[GetSellPrice](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getsellprice)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/n0PdGvMvtwj5utqHsOYa" %}
[GetSellPriceAfterFee](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getsellpriceafterfee)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/jiw4GtFj1KVyyrvcwKni" %}
[Discover](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/discover)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/d04NzkEFixDcCz6xBR2Y" %}
[Explore](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/explore)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/MF2KKS2YTxlEQhOI2a8x" %}
[GetCommentsOnFarcaster](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getcommentsonfarcaster)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/psRG5dsiTlt1cRtD7pas" %}
[GetCommentsOnLens](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getcommentsonlens)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/iPmF46Y9b6jxCVZP1vJI" %}
[GetHolders](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getholders)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/CSbfxedEPOT1xooxTzS3" %}
[GetAssets](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getassets)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/uQIp2FkECNJxsX88g7lG" %}
[GetProfileAndKey](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getprofileandkey)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/pW5sE7jR6Uc7grpZ5pJn" %}
[GetActivated](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getactivated)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/AwW967Dy63MdQGilCikL" %}
[GetHoldersByAddress](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getholdersbyaddress)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/7QjUgkxywNZTFKxnrwGA" %}
[GetHoldingByAddress](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getholdingbyaddress)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/evCRiY2583M6vILLJKTK" %}
[GetKeyInfo](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getkeyinfo)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/nHsJkU45h48h14ezVLX9" %}
[GetTrending](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/gettrending)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/G5SP8zdaTeBJQdhqUSdP" %}
[GetTrendingVolume](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/gettrendingvolume)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/9vFqZ5nUqNhhhHiigkr9" %}
[GetTradesLatest](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/gettradeslatest)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/IOuW4ZAhaHDJfgcbJhdn" %}
[GetTradesList](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/gettradeslist)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/gx6bNPEkVanmYBwPuhe0" %}
[GetClaimable](/monetization/profile-as-an-asset/for-farcaster-dapp/apis/getclaimable)
{% endcontent-ref %}


# GetBuyPrice

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/calculate/buy_price</th></tr></thead><tbody><tr><td>Title</td><td>GetBuyPrice</td></tr><tr><td>Description</td><td>Get buy price of the Key based on amount</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>int</td><td>YES</td><td>The Farcaster FID of the creator</td></tr><tr><td>amount</td><td>int</td><td>YES</td><td>The amount of Key to be purchased</td></tr><tr><td>ecosystem</td><td>string</td><td>YES</td><td>Only suppports "farcaster"</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/calculate/buy_price?creatorId=10001&amount=1&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/calculate/buy_price?creatorId=10001&amount=1&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "ts": "2023-12-22 04:05:33.80184",
  "msg": "OK",
  "data": 127083333333334
}
```


# GetBuyPriceAfterFee

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/calculate/buy_price/after_fee</th></tr></thead><tbody><tr><td>Title</td><td>GetBuyPriceAfterFee</td></tr><tr><td>Description</td><td>Get buy price after fee of the Key based on amount</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>int</td><td>YES</td><td>The Farcaster FID of creator</td></tr><tr><td>amount</td><td>int</td><td>YES</td><td>The amount of Key to be purchased</td></tr><tr><td>ecosystem</td><td>string</td><td>YES</td><td>Only suppports "farcaster"</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/calculate/buy_price/after_fee?creatorId=10001&amount=1&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/calculate/buy_price/after_fee?creatorId=10001&amount=1&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "ts": "2023-12-22 04:08:34.20110",
  "msg": "OK",
  "data": 127337500000000
}
```


# GetSellPrice

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/calculate/sell_price</th></tr></thead><tbody><tr><td>Title</td><td>GetSellPriceAfterFee</td></tr><tr><td>Description</td><td>Get sell price of the Key based on amount</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>int</td><td>YES</td><td>The Farcaster FID of creator</td></tr><tr><td>amount</td><td>int</td><td>YES</td><td>The amount of Key to be sold</td></tr><tr><td>ecosystem</td><td>string</td><td>YES</td><td>Only suppports "farcaster"</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/calculate/sell_price?creatorId=10001&amount=1&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/calculate/sell_price?creatorId=10001&amount=1&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "ts": "2023-12-22 04:09:45.58160",
  "msg": "OK",
  "data": 70691666666668
}
```


# GetSellPriceAfterFee

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/calculate/sell_price/after_fee</th></tr></thead><tbody><tr><td>Title</td><td>GetSellPriceAfterFee</td></tr><tr><td>Description</td><td>Get sell price after fee of the Key based on amount</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>creatorId</td><td>int</td><td>YES</td><td>The Farcaster FID of creator</td></tr><tr><td>amount</td><td>int</td><td>YES</td><td>The amount of Key to be purchased</td></tr><tr><td>ecosystem</td><td>string</td><td>YES</td><td>Only suppports "farcaster"</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/calculate/sell_price/after_fee?creatorId=10001&amount=1&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/calculate/sell_price/after_fee?creatorId=10001&amount=1&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "ts": "2023-12-22 04:11:09.11329",
  "msg": "OK",
  "data": 70833333333334
}
```


# Discover

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/content/discover</th></tr></thead><tbody><tr><td>Title</td><td>Discover</td></tr><tr><td>Description</td><td>Get the posts feed of creators who have activated their Profile Key</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/content/discover?ecosystem=farcaster&limit=10' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/content/discover?ecosystem=farcaster&limit=10`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "items": [
      {
        "hash": "0x57f8c700986f2a0c7ddfc366c10de2a6b91b59d2",
        "threadHash": "0x57f8c700986f2a0c7ddfc366c10de2a6b91b59d2",
        "parentHash": "",
        "parentAuthor": null,
        "author": {
          "fid": 10001,
          "username": "demo1",
          "displayName": "demo1",
          "pfp": {
            "url": "https://demo.com/demo1.jpg",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "",
              "mentions": []
            },
            "location": {
              "placeId": "demo",
              "description": "demo"
            }
          },
          "followerCount": 16,
          "followingCount": 21,
          "activeOnFcNetwork": false,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 10001,
            "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
          }
        },
        "embeds": {
          "images": [
            {
              "type": "image",
              "url": "https://demo.com/demo1.jpeg",
              "sourceUrl": "https://demo.com/demo1.jpeg",
              "alt": "Cast image embed"
            }
          ],
          "processedCastText": ""
        },
        "text": "",
        "timestamp": 1703218178000,
        "replies": {
          "count": 0
        },
        "reactions": {
          "count": 0
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": null
      },
      {
        "hash": "0xed814e2d4ac14336b5028cb57d039594760d1461",
        "threadHash": "0xed814e2d4ac14336b5028cb57d039594760d1461",
        "parentHash": "",
        "parentAuthor": null,
        "author": {
          "fid": 10002,
          "username": "demo2",
          "displayName": "demo2",
          "pfp": {
            "url": "https://demo.com/demo2.jpg",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "",
              "mentions": []
            },
            "location": {
              "placeId": "demo",
              "description": "demo"
            }
          },
          "followerCount": 22,
          "followingCount": 34,
          "activeOnFcNetwork": false,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 10002,
            "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
          }
        },
        "embeds": {
          "images": [
            {
              "type": "image",
              "url": "https://demo.com/demo2.jpeg",
              "sourceUrl": "https://demo.com/demo2.jpeg",
              "alt": "Cast image embed"
            }
          ],
          "processedCastText": ""
        },
        "text": "",
        "timestamp": 1703213404000,
        "replies": {
          "count": 1
        },
        "reactions": {
          "count": 1
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": null
      },
      ...
    ]
  },
  "ts": "2023-12-22 04:18:10.45494"
}
```


# Explore

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/content/explore</th></tr></thead><tbody><tr><td>Title</td><td>Explore</td></tr><tr><td>Description</td><td>Get Expore Feed from Farcaster or Lens</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>cursor</td><td>string</td><td>NO</td><td>After calling this API, you will get the parameter cursor from the return value. When calling this API again, pass cursor as the value for the parameter cursor, which filters out data before the cursor and only queries data after the cursor.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/content/explore?ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/content/explore?ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "trades": {},
    "items": [
      {
        "hash": "0x57f8c700986f2a0c7ddfc366c10de2a6b91b59d2",
        "threadHash": "0x57f8c700986f2a0c7ddfc366c10de2a6b91b59d2",
        "parentHash": "",
        "parentAuthor": null,
        "author": {
          "fid": 10001,
          "username": "demo1",
          "displayName": "demo1",
          "pfp": {
            "url": "https://demo.com/demo1.jpg",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "",
              "mentions": []
            },
            "location": {
              "placeId": "demo",
              "description": "demo"
            }
          },
          "followerCount": 16,
          "followingCount": 21,
          "activeOnFcNetwork": false,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 10001,
            "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
          }
        },
        "embeds": {
          "images": [
            {
              "type": "image",
              "url": "https://demo.com/demo1.jpeg",
              "sourceUrl": "https://demo.com/demo1.jpeg",
              "alt": "Cast image embed"
            }
          ],
          "processedCastText": ""
        },
        "text": "",
        "timestamp": 1703218178000,
        "replies": {
          "count": 0
        },
        "reactions": {
          "count": 0
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": null
      },
      {
        "hash": "0xed814e2d4ac14336b5028cb57d039594760d1461",
        "threadHash": "0xed814e2d4ac14336b5028cb57d039594760d1461",
        "parentHash": "",
        "parentAuthor": null,
        "author": {
          "fid": 10002,
          "username": "demo2",
          "displayName": "demo2",
          "pfp": {
            "url": "https://demo.com/demo2.jpg",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "",
              "mentions": []
            },
            "location": {
              "placeId": "demo",
              "description": "demo"
            }
          },
          "followerCount": 22,
          "followingCount": 34,
          "activeOnFcNetwork": false,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 10002,
            "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
          }
        },
        "embeds": {
          "images": [
            {
              "type": "image",
              "url": "https://demo.com/demo2.jpeg",
              "sourceUrl": "https://demo.com/demo2.jpeg",
              "alt": "Cast image embed"
            }
          ],
          "processedCastText": ""
        },
        "text": "",
        "timestamp": 1703213404000,
        "replies": {
          "count": 1
        },
        "reactions": {
          "count": 1
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": null
      },
      ...
    ],
    "pageInfo": {
      "cursor": "eyJwYWdlIjoxLCJsaW1pdCI6MTV9"
    }
  },
  "ts": "2023-12-22 04:35:53.04250"
}
```


# GetCommentsOnFarcaster

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/content/farcaster/{id}/comments</th></tr></thead><tbody><tr><td>Title</td><td>GetCommentsOnFarcaster</td></tr><tr><td>Description</td><td>Get comments of one publication on Farcaster</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>YES</td><td>The hash of publiaction</td></tr><tr><td>cursor</td><td>string</td><td>NO</td><td>After calling this API, you will get the parameter cursor from the return value. When calling this API again, pass cursor as the value for the parameter cursor, which filters out data before the cursor and only queries data after the cursor</td></tr><tr><td>username</td><td>string</td><td>YES</td><td>The creator's username</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/content/farcaster/0x06f2925a58d0f9a5769436e8a48a25eff8237114/comments?limit=TwentyFive&username=dwr.eth' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/content/farcaster/0x06f2925a58d0f9a5769436e8a48a25eff8237114/comments?limit=TwentyFive&username=dwr.eth`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "trades": {},
    "items": [
      {
        "hash": "0x50c9887e246569b30b922ea3b8900b4f456eb314",
        "threadHash": "0x06f2925a58d0f9a5769436e8a48a25eff8237114",
        "parentHash": "0x06f2925a58d0f9a5769436e8a48a25eff8237114",
        "parentAuthor": {
          "fid": 3,
          "username": "dwr.eth",
          "displayName": "Dan Romero",
          "pfp": {
            "url": "",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "Working on Farcaster and Warpcast.",
              "mentions": []
            },
            "location": {
              "placeId": "ChIJE9on3F3HwoAR9AhGJW_fL-I",
              "description": "Los Angeles, CA, USA"
            }
          },
          "followerCount": 32717,
          "followingCount": 2721,
          "activeOnFcNetwork": true,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": null
        },
        "author": {
          "fid": 347,
          "username": "greg",
          "displayName": "Greg",
          "pfp": {
            "url": "https://i.seadn.io/gae/YsASemS2qwPJK2yI9fmN8HX1-DeIDy9EQxX4KsRk9rkniwn9A7xUyMu_vKR75Oxrs8QAKfIjqdmf6Aw9A9fsehJHWSz2LiNpnV_TPQ?w=500&auto=format",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "I like building apps on web3 protocols. DevRel @ ENS Labs. gregskril.com",
              "mentions": []
            },
            "location": {
              "placeId": "ChIJOwg_06VPwokRYv534QaPC8g",
              "description": "New York, NY, USA"
            }
          },
          "followerCount": 28958,
          "followingCount": 594,
          "activeOnFcNetwork": true,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 347,
            "custodyAddress": "0xB4F195e9A982C2bA58988Cb2132557378e9E6b08"
          }
        },
        "embeds": {
          "images": [
            {
              "type": "image",
              "url": "https://res.cloudinary.com/merkle-manufactory/image/fetch/c_fill,f_jpg/https://i.imgur.com/4yCohXZ.jpg",
              "sourceUrl": "https://i.imgur.com/4yCohXZ.jpg",
              "alt": "Cast image embed"
            }
          ]
        },
        "text": "",
        "timestamp": 1703107502000,
        "replies": {
          "count": 0
        },
        "reactions": {
          "count": 13
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": {
          "reacted": false,
          "recast": false,
          "watched": false
        }
      },
      {
        "hash": "0xf6fbdd5ca66a4cb457a3ff2ac93dffea7e8624c2",
        "threadHash": "0x06f2925a58d0f9a5769436e8a48a25eff8237114",
        "parentHash": "0x06f2925a58d0f9a5769436e8a48a25eff8237114",
        "parentAuthor": {
          "fid": 3,
          "username": "dwr.eth",
          "displayName": "Dan Romero",
          "pfp": {
            "url": "",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "Working on Farcaster and Warpcast.",
              "mentions": []
            },
            "location": {
              "placeId": "ChIJE9on3F3HwoAR9AhGJW_fL-I",
              "description": "Los Angeles, CA, USA"
            }
          },
          "followerCount": 32717,
          "followingCount": 2721,
          "activeOnFcNetwork": true,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": null
        },
        "author": {
          "fid": 194,
          "username": "rish",
          "displayName": "rish",
          "pfp": {
            "url": "https://res.cloudinary.com/merkle-manufactory/image/fetch/c_fill,f_png,w_256/https://lh3.googleusercontent.com/MEaRCAMdER6MKcvmlfN1-0fVxOGz6w98R8CrP_Rpzse9KZudgn95frTd0L0ZViWVklBj9fuAcJuM6tt7P-BRN0ouAR87NpzZeh2DGw",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "@neynar 🪐 | nf.td/rish",
              "mentions": [
                "neynar"
              ]
            },
            "location": {
              "placeId": "",
              "description": ""
            }
          },
          "followerCount": 15496,
          "followingCount": 487,
          "activeOnFcNetwork": true,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 194,
            "custodyAddress": "0xB95dC10483bE18F7C69DDF78D4BAAfEcc01c5530"
          }
        },
        "embeds": null,
        "text": "\"farcaster boycott person\" is how I am going to refer to them from now on",
        "timestamp": 1703107380000,
        "replies": {
          "count": 0
        },
        "reactions": {
          "count": 6
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": {
          "reacted": false,
          "recast": false,
          "watched": false
        }
      },
      {
        "hash": "0x42e190d86758c922c2535811850d42fd64f0ee18",
        "threadHash": "0x06f2925a58d0f9a5769436e8a48a25eff8237114",
        "parentHash": "0x06f2925a58d0f9a5769436e8a48a25eff8237114",
        "parentAuthor": {
          "fid": 3,
          "username": "dwr.eth",
          "displayName": "Dan Romero",
          "pfp": {
            "url": "",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "Working on Farcaster and Warpcast.",
              "mentions": []
            },
            "location": {
              "placeId": "ChIJE9on3F3HwoAR9AhGJW_fL-I",
              "description": "Los Angeles, CA, USA"
            }
          },
          "followerCount": 32717,
          "followingCount": 2721,
          "activeOnFcNetwork": true,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": null
        },
        "author": {
          "fid": 557,
          "username": "pugson",
          "displayName": "pugson",
          "pfp": {
            "url": "https://i.seadn.io/gae/5hjYfRyqiRJV4EQ7ieSJrmb1LtO_vcAvREXSqnlY4HXXBsvgh1vumOwj5e4GwGhppEU2jLC9qJHEgEkaJ9V_B02jIFY9XmzgK1_F?w=500&auto=format",
            "verified": false
          },
          "profile": {
            "bio": {
              "text": "✦ 𝚆𝙸𝙿: @vision 👁️ ✦ ensdata.net ✦ abidata.net ✦ 𝙿𝚁𝙴𝚅: ui engineer @rainbow  🌈  ✦ final-v3.zip",
              "mentions": [
                "vision",
                "rainbow"
              ]
            },
            "location": {
              "placeId": "",
              "description": ""
            }
          },
          "followerCount": 22008,
          "followingCount": 1619,
          "activeOnFcNetwork": true,
          "referrerUsername": "",
          "viewerContext": {
            "following": false,
            "followedBy": false,
            "canSendDirectCasts": false,
            "hasUploadedInboxKeys": false
          },
          "extras": {
            "fid": 557,
            "custodyAddress": "0xD7648B9d940e051b76Fc7d755138159E6cE2436E"
          }
        },
        "embeds": null,
        "text": "i'm offended that you're chatting over twitter dms",
        "timestamp": 1703113112000,
        "replies": {
          "count": 0
        },
        "reactions": {
          "count": 4
        },
        "recasts": {
          "count": 0,
          "recasters": []
        },
        "watches": {
          "count": 0
        },
        "recast": false,
        "viewerContext": {
          "reacted": false,
          "recast": false,
          "watched": false
        }
      },
      ...
    ],
    "pageInfo": {
      "cursor": ""
    }
  },
  "ts": "2023-12-21 08:23:26.24207"
}
```


# GetCommentsOnLens

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/content/lens/{id}/comments</th></tr></thead><tbody><tr><td>Title</td><td>GetCommentsOnLens</td></tr><tr><td>Description</td><td>Get comments of one publication on Lens</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>YES</td><td>The id of publiaction</td></tr><tr><td>cursor</td><td>string</td><td>NO</td><td>After calling this API, you will get the parameter cursor from the return value. When calling this API again, pass cursor as the value for the parameter cursor, which filters out data before the cursor and only queries data after the cursor</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/content/lens/0x01-0x01/comments' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/content/lens/0x01-0x01/comments`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "trades": {},
    "items": [
      {
        "id": "0x56-0x06",
        "by": {
          "id": "0x56",
          "handle": {
            "fullHandle": "test/krzysu",
            "localName": "krzysu",
            "suggestedFormatted": {
              "localName": "@krzysu"
            },
            "linkedTo": {
              "nftTokenId": "0x56",
              "__typename": "HandleLinkedTo"
            }
          },
          "ownedBy": {
            "address": "0x3fC47cdDcFd59dce20694b575AFc1D94186775b0",
            "chainId": 80001
          },
          "metadata": {
            "displayName": "",
            "bio": "",
            "rawURI": "",
            "appId": null,
            "picture": {
              "optimized": {
                "uri": ""
              }
            }
          }
        },
        "createdAt": "2023-12-08T14:50:34Z",
        "stats": {
          "id": "0x56-0x06",
          "comments": 0,
          "mirrors": 0,
          "quotes": 0,
          "reactions": 0,
          "countOpenActions": 0,
          "bookmarks": 0
        },
        "operations": {
          "__typename": "PublicationOperations",
          "canComment": "NO",
          "canMirror": "NO",
          "hasActed": {
            "__typename": "OptimisticStatusResult",
            "value": false
          },
          "hasBookmarked": false,
          "hasMirrored": false,
          "hasQuoted": false,
          "hasReacted": false,
          "isNotInterested": false
        },
        "metadata": {
          "__typename": "TextOnlyMetadataV3",
          "appId": "hey",
          "attributes": null,
          "content": "hello",
          "id": "deec5a3e-a8bd-4c48-af4e-2e91921d95b9",
          "locale": "en",
          "rawURI": "ar://sNp8CX8u-gSl7kZ4mm-1Wv1Im8lQucMHs2_YKBT1rY8",
          "tags": null
        },
        "__typename": "Comment",
        "commentOn": {
          "__typename": "Post",
          "by": {
            "__typename": "Profile",
            "handle": {
              "__typename": "HandleInfo",
              "fullHandle": "test/lensprotocol",
              "linkedTo": {
                "__typename": "HandleLinkedTo",
                "nftTokenId": "0x01"
              },
              "localName": "lensprotocol",
              "suggestedFormatted": {
                "__typename": "SuggestedFormattedHandle",
                "localName": "@lensprotocol"
              }
            },
            "id": "0x01",
            "metadata": null,
            "ownedBy": {
              "__typename": "NetworkAddress",
              "address": "0x1A1cDf59C94a682a067fA2D288C2167a8506abd7",
              "chainId": 80001
            }
          },
          "createdAt": "2023-11-23T17:13:55.000Z",
          "id": "0x01-0x01",
          "isEncrypted": false,
          "isHidden": false,
          "metadata": {
            "__typename": "ImageMetadataV3",
            "appId": "hey",
            "asset": {
              "__typename": "PublicationMetadataMediaImage",
              "image": {
                "__typename": "EncryptableImageSet",
                "optimized": {
                  "__typename": "Image",
                  "uri": "https://ik.imagekit.io/lens/media-snapshot/44fb2eb851646cfe82daff3bbcb38a278d5e5c03e21699fcf8d0eacd1bb04f17.png"
                },
                "raw": {
                  "__typename": "EncryptableImage",
                  "uri": "ipfs://bafybeihcijwrdix32s7sg4khf3jgfvtvhu3yxif5tkxqtvpyovedtew2du"
                }
              }
            },
            "attachments": [
              {
                "__typename": "PublicationMetadataMediaImage",
                "image": {
                  "__typename": "EncryptableImageSet",
                  "optimized": {
                    "__typename": "Image",
                    "uri": "https://ik.imagekit.io/lens/media-snapshot/44fb2eb851646cfe82daff3bbcb38a278d5e5c03e21699fcf8d0eacd1bb04f17.png"
                  },
                  "raw": {
                    "__typename": "EncryptableImage",
                    "uri": "ipfs://bafybeihcijwrdix32s7sg4khf3jgfvtvhu3yxif5tkxqtvpyovedtew2du"
                  }
                }
              }
            ],
            "attributes": null,
            "content": "Today, we proudly introduce ourselves as Avara. \n\nAvara is the home to some of the most innovative web3 brands: Aave, Lens Protocol, GHO, Sonar, and now Family, all building towards a people powered internet that benefits all.\n\nWe're thrilled to announce the acquisition of Family. With Family, led by Benji Taylor, we're reinforcing our commitment to making web3 accessible through world class product design.\n\nRead the genesis post, penned by @lens/stani.\nhttps://avara.xyz/blog/introducing-avara-and-announcing-acquisition-of-family",
            "id": "7e0994f0-b01b-41d4-b625-193133417dc0",
            "locale": "en",
            "rawURI": "ar://jFpc9bUyrlYhOOBN3KCIpuT3aAgm5WymRno8pe3BJzg",
            "tags": null,
            "title": "Post by @avara"
          },
          "momoka": null,
          "openActionModules": [
            {
              "__typename": "LegacyFeeCollectModuleSettings",
              "type": "LegacyFeeCollectModule"
            }
          ],
          "operations": {
            "__typename": "PublicationOperations",
            "canComment": "NO",
            "canMirror": "NO",
            "hasActed": {
              "__typename": "OptimisticStatusResult",
              "value": false
            },
            "hasBookmarked": false,
            "hasMirrored": false,
            "hasQuoted": false,
            "hasReacted": false,
            "isNotInterested": false
          },
          "profilesMentioned": [],
          "publishedOn": {
            "__typename": "App",
            "id": "hey"
          },
          "stats": {
            "__typename": "PublicationStats",
            "bookmarks": 0,
            "comments": 2,
            "countOpenActions": 0,
            "id": "0x01-0x01",
            "mirrors": 0,
            "quotes": 0,
            "reactions": 0
          },
          "txHash": "0x4790f4638c209f0fdc55e6ff86781a84ba6e9ea03a390adf110d5b4b4c5c7cd6"
        }
      }
    ],
    "pageInfo": {
      "next": "",
      "__typename": "PaginatedResultInfo"
    }
  },
  "ts": "2023-12-21 09:08:00.78385"
}
```


# GetHolders

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/content/{ecosystem}/{id}/holders</th></tr></thead><tbody><tr><td>Title</td><td>GetHolders</td></tr><tr><td>Description</td><td>Get the Key holders for a farcaster account</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YSE</td><td>"lens" or "farcaster" </td></tr><tr><td>id</td><td>string</td><td>YES</td><td>The Farcaster FID of the user</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/content/farcaster/10001/holders' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/content/farcaster/10001/holders`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "holders": [
      {
        "trader": "0x765754CCDa2bfC41e8Fd399Fdd4C076fd79c5545",
        "trader_id": "10001",
        "content_id": "10001",
        "net_amount": 2
      },
      {
        "trader": "0xd54703d1C82413B1eD23F47EcbBABEdC4879593F",
        "trader_id": "10002",
        "content_id": "10001",
        "net_amount": 1
      }
    ],
    "holder_count": 2,
    "profiles": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      },
    },
    "profiles_map": null,
    "holds": 0,
    "sell_price": "0",
    "buy_price": "70833333333333",
    "token": "0x0000000000000000000000000000000000000000",
    "decimal": 18,
    "symbol": "ETH",
    "token_ids": null,
    "link": {},
    "links": {},
    "members": {}
  },
  "ts": "2023-12-21 13:20:20.85126"
}
```


# GetAssets

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/portfolio/me</th></tr></thead><tbody><tr><td>Title</td><td>GetAssets</td></tr><tr><td>Description</td><td>Get user's assets</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>addr</td><td>string</td><td>YES</td><td>The user's EVM wallet address with the social profile</td></tr><tr><td>profile_id</td><td>string</td><td>YES</td><td>The Lens profile id or Farcaster FID of the user</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/token/profile/v1/portfolio/me' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "addr": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754",
    "ecosystem": "farcaster",
    "profile_id": 10001
  }'
```

#### Request URL

`https://api.tako.so/token/profile/v1/portfolio/me`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "balance": "3349744377436924",
    "portfolio_value": "0",
    "fees_earned": "",
    "selloff": "0"
  },
  "ts": "2023-12-21 09:38:48.09303"
}
```


# GetProfileAndKey

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/portfolio/view</th></tr></thead><tbody><tr><td>Title</td><td>GetProfileAndKey</td></tr><tr><td>Description</td><td>Get user's profile infomation and the status of his profile key</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>addr</td><td>string</td><td>YES</td><td>The user's EVM wallet address</td></tr><tr><td>profile_id</td><td>string</td><td>YES</td><td>The Lens profile id or Farcaster FID of the user</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/token/profile/v1/portfolio/view' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "addr": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754",
    "ecosystem": "farcaster",
    "profile_id": 10001
  }'
```

#### Request URL

`https://api.tako.so/token/profile/v1/portfolio/view`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "initiated": true,
    "share_price": "70833333333333",
    "holder_count": 2,
    "profile": {
      "fid": 10001,
      "username": "demo1",
      "displayName": "demo1",
      "pfp": {
        "url": "https://demo.com/demo1.jpg",
        "verified": false
      },
      "profile": {
        "bio": {
          "text": "",
          "mentions": []
        },
        "location": {
          "placeId": "",
          "description": ""
        }
      },
      "followerCount": 8,
      "followingCount": 51,
      "activeOnFcNetwork": false,
      "referrerUsername": "",
      "viewerContext": {
        "following": false,
        "followedBy": false,
        "canSendDirectCasts": true,
        "hasUploadedInboxKeys": true
      },
      "extras": {
        "fid": 10001,
        "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
      }
    },
    "comparison": {
      "now_supply": 3,
      "compared_to": "24h0m0s",
      "now_price": "20843333333333",
      "type": "flat",
      "yield": 0,
      "content_id": "10001",
      "token": "0x0000000000000000000000000000000000000000",
      "symbol": "ETH",
      "decimal": 18
    }
  },
  "ts": "2023-12-21 12:42:31.77099"
}
```


# GetActivated

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/shares/activated</th></tr></thead><tbody><tr><td>Title</td><td>GetActivatied</td></tr><tr><td>Description</td><td>Retrieve the key and profile information of the Farcaster profile that has already been activated</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>NO</td><td>"lens" or "farcaster"</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/shares/activated?limit=10&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://testapi.tako.so/token/profile/v1/shares/activated?limit=10&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "trades": null,
    "items": [
      {
        "now_supply": 3,
        "compared_to": "24h0m0s",
        "now_price": "70845666666666",
        "type": "flat",
        "yield": 0,
        "content_id": "10001",
        "token": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "decimal": 18,
        "create_at": 1703145101
      },
      {
        "now_supply": 3,
        "compared_to": "24h0m0s",
        "now_price": "10000000",
        "type": "flat",
        "yield": 0,
        "content_id": "10002",
        "token": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "decimal": 18,
        "create_at": 1702978279
      },
      {
        "now_supply": 6,
        "compared_to": "24h0m0s",
        "now_price": "345678920",
        "type": "flat",
        "yield": 0,
        "content_id": "10003",
        "token": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "decimal": 18,
        "create_at": 1702978267
      }
    ],
    "profiles": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      },
      "10003": {
        "fid": 10003,
        "username": "demo3",
        "displayName": "demo3",
        "pfp": {
          "url": "https://demo.com/demo3.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 14,
        "followingCount": 39,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": false,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10003,
          "custodyAddress": "0xE9162B421D272714613E7a528e7ED5Cd11fbC196"
        }
      }
    },
    "total": 3
  },
  "ts": "2023-12-21 12:50:08.54647"
}
```


# GetHoldersByAddress

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/shares/holder/byaddr</th></tr></thead><tbody><tr><td>Title</td><td>GetHoldersByAddress</td></tr><tr><td>Description</td><td>Get the Key holders by address that owns a Farcaster or Lens profile</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>addr</td><td>string</td><td>YES</td><td>The user's EVM-wallet address</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/shares/holder/byaddr?addr=0x765754CCDa2bfC41e8Fd399Fdd4C076fd79c5545&limit=10&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/shares/holder/byaddr?addr=`0x765754CCDa2bfC41e8Fd399Fdd4C076fd79c5545`&limit=10&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "shares": [
      {
        "trader": "0xE9162B421D272714613E7a528e7ED5Cd11fbC196",
        "trader_id": "10001",
        "content_id": "10001",
        "net_amount": 2,
        "price": "70833333333333",
        "fake_price": "",
        "real_price": "",
        "latest_trade_at": 0
      },
      {
        "trader": "0x575C05eAaE30FC659719AC81346076d2fC6C05A3",
        "trader_id": "10002",
        "content_id": "10001",
        "net_amount": 1,
        "price": "70833333333333",
        "fake_price": "",
        "real_price": "",
        "latest_trade_at": 0
      }
    ],
    "profiles": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xE9162B421D272714613E7a528e7ED5Cd11fbC196"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 14,
        "followingCount": 39,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": false,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x575C05eAaE30FC659719AC81346076d2fC6C05A3"
        }
      }
    },
    "link": {},
    "links": {},
    "members": {},
    "total": 2
  },
  "ts": "2023-12-21 13:00:46.59664"
}
```


# GetHoldingByAddress

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/shares/holding</th></tr></thead><tbody><tr><td>Title</td><td>GetHolding</td></tr><tr><td>Description</td><td>Get the holding keys of the address that activated</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>addr</td><td>string</td><td>YES</td><td>The user's EVM-wallet address</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/shares/holding?addr=0x765754CCDa2bfC41e8Fd399Fdd4C076fd79c5545&limit=10&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/shares/holding?addr=`0x765754CCDa2bfC41e8Fd399Fdd4C076fd79c5545`&limit=10&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "shares": [
      {
        "trader": "",
        "trader_id": "",
        "content_id": "10001",
        "net_amount": 1,
        "price": "195844349",
        "fake_price": "195844349",
        "real_price": "",
        "latest_trade_at": 0
      },
      {
        "trader": "",
        "trader_id": "",
        "content_id": "10002",
        "net_amount": 1,
        "price": "10000000",
        "fake_price": "10000000",
        "real_price": "",
        "latest_trade_at": 0
      }
    ],
    "profiles": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      },
    },
    "members": null,
    "total": 2
  },
  "ts": "2023-12-21 13:13:33.27903"
}
```


# GetKeyInfo

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/shares/info</th></tr></thead><tbody><tr><td>Title</td><td>GetKeyInfo</td></tr><tr><td>Description</td><td>Get the details of the user's Key</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>creatorId</td><td>int</td><td>YES</td><td>The FID of farcaster or Lens Profile ID</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/shares/info?ecosystem=farcaster&creatorId=10001' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/shares/info?ecosystem=farcaster&creatorId=10001`

### Response

```json
{
  "code": 0,
  "ts": "2023-12-21 13:25:04.93853",
  "msg": "OK",
  "data": {
    "item": {
      "now_supply": 3,
      "compared_to": "24h0m0s",
      "now_price": "2250000000000000000",
      "type": "rise",
      "yield": 8,
      "content_id": "10001",
      "token": "0x0000000000000000000000000000000000000000",
      "symbol": "MATIC",
      "decimal": 18,
      "create_at": 1703145198
    },
    "profile": {
      "activeOnFcNetwork": false,
      "displayName": "demo1",
      "fid": 10001,
      "followerCount": 19,
      "followingCount": 9,
      "pfp": {
        "url": "https://demo.com/demo1.jpg",
        "verified": false
      },
      "profile": {
        "bio": {
          "mentions": [],
          "text": ""
        },
        "location": {
          "description": "",
          "placeId": ""
        }
      },
      "username": "10001",
      "viewerContext": {
        "canSendDirectCasts": false,
        "followedBy": false,
        "following": false,
        "hasUploadedInboxKeys": true
      }
    }
  }
}
```


# GetTrending

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/shares/trending</th></tr></thead><tbody><tr><td>Title</td><td>GetTrending</td></tr><tr><td>Description</td><td>Get the top 50 Keys based on trading volume in the past 7 days</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>limit</td><td>int</td><td>YES</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/shares/trending?ecosystem=farcaster&limit=10' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/shares/trending?ecosystem=farcaster&limit=10`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "trades": null,
    "items": [
      {
        "now_supply": 3,
        "compared_to": "24h0m0s",
        "now_price": "70833333333333",
        "type": "flat",
        "yield": 0,
        "content_id": "10001",
        "token": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "decimal": 18
      },
      {
        "now_supply": 6,
        "compared_to": "24h0m0s",
        "now_price": "277098920",
        "type": "rise",
        "yield": 0.41,
        "content_id": "10002",
        "token": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "decimal": 18
      },
      {
        "now_supply": 3,
        "compared_to": "24h0m0s",
        "now_price": "10000000",
        "type": "flat",
        "yield": 0,
        "content_id": "10003",
        "token": "0x0000000000000000000000000000000000000000",
        "symbol": "ETH",
        "decimal": 18
      }
    ],
    "profiles": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      },
      "10003": {
        "fid": 10003,
        "username": "demo3",
        "displayName": "demo3",
        "pfp": {
          "url": "https://demo.com/demo3.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 14,
        "followingCount": 39,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": false,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10003,
          "custodyAddress": "0xE9162B421D272714613E7a528e7ED5Cd11fbC196"
        }
      }
    }
  },
  "ts": "2023-12-21 13:37:56.94749"
}
```


# GetTrendingVolume

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/shares/trending/volume</th></tr></thead><tbody><tr><td>Title</td><td>GetTrendingVolume</td></tr><tr><td>Description</td><td>Get the top 50 keys based on price ranking</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>duration</td><td>int</td><td>YES</td><td>"1d", "3d" or "7d"</td></tr><tr><td>limit</td><td>int</td><td>YES</td><td>The number of bids displayed per page, default to 10</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/shares/trending/volume?limit=10&duration=1d&ecosystem=farcaster' \
  -H 'accept: application/json'
```

#### Request URL

`https://testapi.tako.so/token/profile/v1/shares/trending/volume?limit=10&duration=1d&ecosystem=farcaster`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "trades": null,
    "items": [
      {
        "content_id": "10001",
        "total_price": "750042189",
        "now_price": "277098920"
      },
      {
        "content_id": "10002",
        "total_price": "10000000",
        "now_price": "10000000"
      },
      {
        "content_id": "10003",
        "total_price": "0",
        "now_price": "70833333333333"
      }
    ],
    "profiles": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      },
      "10003": {
        "fid": 10003,
        "username": "demo3",
        "displayName": "demo3",
        "pfp": {
          "url": "https://demo.com/demo3.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 14,
        "followingCount": 39,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": false,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10003,
          "custodyAddress": "0xE9162B421D272714613E7a528e7ED5Cd11fbC196"
        }
      }
    }
  },
  "ts": "2023-12-21 16:15:07.86245"
}
```


# GetTradesLatest

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/trades/latest</th></tr></thead><tbody><tr><td>Title</td><td>GetTradesLatest</td></tr><tr><td>Description</td><td>Get the latest trades list</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>limit</td><td>int</td><td>YES</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/token/profile/v1/trades/latest?ecosystem=farcaster&limit=10' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/token/profile/v1/trades/latest?ecosystem=farcaster&limit=10`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "list": [
      {
        "id": 861,
        "is_buy": true,
        "trader": "0x080Fd1E11c86122077e86695ff36785dc07c5bBa",
        "trader_id": "211705",
        "type": 1,
        "price": "100000000000000",
        "content_id": "10001",
        "amount": 1,
        "supply": 1,
        "create_at": 1703225183
      },
      {
        "id": 860,
        "is_buy": true,
        "trader": "0x0340Df22E427961D378D0DA6Ef8a5C65779bBf9D",
        "trader_id": "",
        "type": 1,
        "price": "277098920",
        "content_id": "10002",
        "amount": 1,
        "supply": 7,
        "create_at": 1703218709
      },
      
    ],
    "profile": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      }
    },
    "links": {},
    "members": {},
    "total": 29
  },
  "ts": "2023-12-22 07:37:48.97199"
}
```


# GetTradesList

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/trades/list</th></tr></thead><tbody><tr><td>Title</td><td>GetTradesList</td></tr><tr><td>Description</td><td>Get trades list based on custom conditions</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="194">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>limit</td><td>int</td><td>YES</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr><tr><td>addr</td><td>string</td><td>YES</td><td>The user's EVM wallet address</td></tr><tr><td>with_your_keys</td><td>bool</td><td>NO</td><td>Trades list for the activated keys at addr</td></tr><tr><td>with_your_holdings</td><td>bool</td><td>NO</td><td>Trades list for the keys held by addr</td></tr><tr><td>with_your_trades</td><td>bool</td><td>NO</td><td>Trades list for the trades made by addr</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://testapi.tako.so/token/profile/v1/trades/list?ecosystem=farcaster&limit=10&addr=0x0340Df22E427961D378D0DA6Ef8a5C65779bBf9D&with_your_keys=false&with_your_holdings=false&with_your_trades=true' \
  -H 'accept: application/json'
```

#### Request URL

\
`https://testapi.tako.so/token/profile/v1/trades/list?ecosystem=farcaster&limit=10&addr=`0x0340Df22E427961D378D0DA6Ef8a5C65779bBf9D`&with_your_keys=false&with_your_holdings=false&with_your_trades=true`

### Response

```json
{
  "code": 0,
  "msg": "OK",
  "data": {
    "list": [
      {
        "id": 833,
        "is_buy": true,
        "trader": "0x940314ca8BA65d956617E9f7043E4641d0FB0a94",
        "trader_id": "",
        "type": 1,
        "price": "127090482",
        "content_id": "10001",
        "amount": 1,
        "supply": 5,
        "create_at": 1703007289
      },
      {
        "id": 832,
        "is_buy": true,
        "trader": "0x5284F831Da9e5A13eCE18821025F90725780e64B",
        "trader_id": "16889",
        "type": 1,
        "price": "20000000",
        "content_id": "10002",
        "amount": 2,
        "supply": 2,
        "create_at": 1702907019
      }
    ],
    "profile": {
      "10001": {
        "fid": 10001,
        "username": "demo1",
        "displayName": "demo1",
        "pfp": {
          "url": "https://demo.com/demo1.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 8,
        "followingCount": 51,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10001,
          "custodyAddress": "0xcb093137a3098dEbBCe9C5D416D9A257914d9754"
        }
      },
      "10002": {
        "fid": 10002,
        "username": "demo2",
        "displayName": "demo2",
        "pfp": {
          "url": "https://demo.com/demo2.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "text": "",
            "mentions": []
          },
          "location": {
            "placeId": "",
            "description": ""
          }
        },
        "followerCount": 19,
        "followingCount": 9,
        "activeOnFcNetwork": false,
        "referrerUsername": "",
        "viewerContext": {
          "following": false,
          "followedBy": false,
          "canSendDirectCasts": true,
          "hasUploadedInboxKeys": true
        },
        "extras": {
          "fid": 10002,
          "custodyAddress": "0x1E76aF80cc21e1E3cf8F7d3C170D585D265E0a89"
        }
      }
    },
    "links": {},
    "members": {
      "0x940314ca8BA65d956617E9f7043E4641d0FB0a94": {
        "nickname": "demox",
        "avatar": ""
      },
      "0x5284F831Da9e5A13eCE18821025F90725780e64B": {
        "nickname": "demoy",
        "avatar": ""
      }
    },
    "total": 3
  },
  "ts": "2023-12-19 17:46:07.32364"
}
```


# GetClaimable

## API

<table><thead><tr><th width="169">API</th><th>/token/profile/v1/{ecosystem}/claimable</th></tr></thead><tbody><tr><td>Title</td><td>GetClaimable</td></tr><tr><td>Description</td><td>Get the claimable fee</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>Only support "farcaster" now</td></tr><tr><td>addr</td><td>string</td><td>YES</td><td>The user's EVM wallet address</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/token/profile/v1/farcaster/claimable' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "addr": "0xa75648322b4a6B6d55159f3cBB8a204faA9f53CD"
  }'
```

#### Request URL

`https://api.tako.so/token/profile/v1/farcaster/claimable`

### Response

```json
{
  "code": 0,
  "ts": "2023-12-21 16:18:58.94316",
  "msg": "OK",
  "data": 120000
}
```


# Open Curation

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/p0KiQCXKdigaGm7GAc1O" %}
[Introduction](/monetization/open-curation/introduction)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/rTQL45o80pH61e4Nld7o" %}
[API Overview](/monetization/open-curation/api-overview)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/p7GWSo7pHn4rf14DJBp8" %}
[For Lens dApp](/monetization/open-curation/for-lens-dapp)
{% endcontent-ref %}


# Introduction

The open curation module operates as a permissionless approach to content promotion, focusing on incentivizing real human engagement. It distinguishes itself from traditional methods by utilizing the Lens quote post function to monitor and record interactions, avoiding reliance on centralized and opaque algorithms.&#x20;

Within this permissionless module, anyone can participate in sharing a piece of content by quote posting. The reward offered by the content creator is granted to the curator who achieves the highest level of engagement on their quote post. This approach ensures that creators can maximize the value of their investment, while fans can actively support their favorite creators through their content and social influence.

The open curation module involves two primary roles:

#### Bidder

Login with a wallet address or creator profile (i.e. Lens handle). They can:

* Create a bid: set up an open curation bid by selecting a post and specifying the bid amount. The curation type is limited to quote posts, ensuring trustless settlement.
* Update a bid: modify the bid data before a bid expires, including extending durations or increasing bid amounts.
* Cancel a bid (Claim back): reclaim funds from the smart contract if a bid expires or the curator has accepted but didn't claim the funds within 7 days.

#### Curator

Login with a creator profile (i.e. Lens handle). They can:

* Curate: quote post an active open curation post through the Tako API
* Claim: after a specified period (T=48h), the sum of mirrors and comments on each quote post made through Tako's open curation module is calculated based on traceable and trustless data. The curator who created the quote post with the highest mirrors + comments can claim the reward.

***

#### Supported Ecosystems

{% content-ref url="/pages/p7GWSo7pHn4rf14DJBp8" %}
[For Lens dApp](/monetization/open-curation/for-lens-dapp)
{% endcontent-ref %}


# API Overview

## 1. API Base Link

### Based on the contracts deployed on Polygon Mainnet

[https://api.tako.so](https://testapi.takoyaki.so/)

### Based on the contracts deployed on Mumbai Testnet

[https://testapi.tako.so](https://testapi.takoyaki.so/)

## 2. How To Use

### For GET Method API

Assume you will use the API GetLensCuratorAccepted. Its route is "/v2/lens/curator/accepted".

The first step you should compose the base link with the API route:

`https://api.tako.so/v2/lens/curator/accepted?profileId=36113&cursor=0`

Please refer to the API documentation for specific parameters and requirements.

Now, you can request the full link using JavaScript, Python, cURL, etc. Then, you will receive a response from the Tako server.

### For POST method API

Like the GET method, you must pass the parameters in the request body as application/json.

## 3. Rate Limit

The cumulative number of API accesses from the same IP address should not exceed <mark style="color:red;">**180 times per minute**</mark>.

## 4. Request Format

* GET method: All parameters are included in the URL.
* POST method: All parameters are formatted as JSON data and put in the request body.

## 5. Response Format

The response is JSON format. There are four parameters at the top level:&#x20;

* status
* data
* error\_code
* error\_message

<table><thead><tr><th width="182">Parameter</th><th width="183">Data Type</th><th width="169">Visibility</th><th>Description</th></tr></thead><tbody><tr><td>status</td><td>string</td><td>Always visible</td><td>Indicate whether the API access is successful.</td></tr><tr><td>data</td><td>The return value of each API determines it.</td><td>Visible only when API access is successful</td><td>The return value of API</td></tr><tr><td>error_code</td><td>int</td><td>Visible only when API access fails</td><td>See the table “Error Code” below</td></tr><tr><td>error_message</td><td>string</td><td>Visible only when API access fails</td><td>The reason for the error</td></tr></tbody></table>

### 6. Response Example

#### When API access is successful

```json
{
    "status": "success",
    "data": {
        Object
    }
}
```

#### When API access fails

```json
{
  "status": "error",
  "error_code": 600,
  "error_msg": "The reason for error."
}
```

## 7. Error Code

<table><thead><tr><th width="122.33333333333331">Code</th><th width="208">Title</th><th>Description</th></tr></thead><tbody><tr><td>1100</td><td>InvalidRequestBody</td><td>Invalid Request Body</td></tr><tr><td>1101</td><td>InvalidParameter</td><td>Invalid Parameter</td></tr><tr><td>3000</td><td>InvalidAddress</td><td>Invalid address</td></tr><tr><td>3001</td><td>VerifyOwnerProofFail</td><td>Verify ownerProof fail</td></tr><tr><td>3002</td><td>TimeExpired</td><td>Time is expired</td></tr><tr><td>3003</td><td>TimeInvalid</td><td>Invalid time</td></tr><tr><td>3004</td><td>DuplicateVote</td><td>Duplicate vote</td></tr><tr><td>1000</td><td>InternalSystemError</td><td>System Error(1000)</td></tr><tr><td>1001</td><td>DatabaseError</td><td>System Busy(1001)</td></tr><tr><td>1002</td><td>RedisError</td><td>System Busy(1002)</td></tr><tr><td>1003</td><td>FilesystemError</td><td>System Busy(1003)</td></tr><tr><td>1004</td><td>RemoteServiceError</td><td>System Busy(1004)</td></tr></tbody></table>


# For Lens dApp

> **The Tako Open Curation API is now compatible with Lens v2**

Integrate into your Lens dApps:

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/8XM8iKTSEiC5a63mE1pR" %}
[Deployed Contract Address](/monetization/open-curation/for-lens-dapp/deployed-contract-address)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/JWN9wCTqARHv5vH5EGnk" %}
[Contract Specification](/monetization/open-curation/for-lens-dapp/contract-specification)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/Hy9POwLsYWW7u830h5cR" %}
[APIs](/monetization/open-curation/for-lens-dapp/apis)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/DuDDrO2pBmeVp7ptLHl1" %}
[SDK](/monetization/open-curation/for-lens-dapp/sdk)
{% endcontent-ref %}


# Deployed Contract Address

Note: The mainnet contract currently has a whitelist for the [Bidder](broken://pages/m6URVFC4BfHKCdFz8I8p#bidder) addresses. Apply[ here](https://form.zootools.co/go/Gku1ElD19dlnOmcExFl8). There's no whitelist for the testnet.

## 1. Polygon Mainnet

The official block explorer can be found here:

[Polygon Mainnet Block Explorer](https://polygonscan.com/)

<table><thead><tr><th width="251">Contract</th><th>Address</th></tr></thead><tbody><tr><td>TakoOpenLensHub</td><td>Coming soon</td></tr></tbody></table>

## 2. Mumbai Testnet

The official block explorer can be found here:

[Polygon Mumbai Block Explorer](https://mumbai.polygonscan.com/)

<table><thead><tr><th width="251">Contract</th><th>Address</th></tr></thead><tbody><tr><td>TakoOpenLensHub</td><td><a href="https://mumbai.polygonscan.com/address/0xC158A4319BC125e315120DbDfBEa8b8343aa3234">0xC158A4319BC125e315120DbDfBEa8b8343aa3234</a></td></tr></tbody></table>


# Contract Specification

> **The Tako Open Curation API is now compatible with Lens v2**

## Contract File

TakoOpenLensHub.sol

## Overview

Create and receive bids using publications submitted on Lens.

If you deployed the contract independently, you can use the Owner Functions and Governance Functions to initialize the properties for bid.

Use the Bid Function to create bis.

Use the Curate Functions to claim the reward for curators.

Use the View Functions to view the data for bid.

Github: <https://github.com/takoprotocol/contracts>

## Specification

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/ODSSq0GHiwVSK0RGH1vU" %}
[Enums and Structs](/monetization/open-curation/for-lens-dapp/contract-specification/enums-and-structs)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/IY1rRHAZv0Vg68qS3WuF" %}
[Owner Functions](/monetization/open-curation/for-lens-dapp/contract-specification/owner-functions)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/cdzQiNJIwJvgWYs1MCB1" %}
[Governance Functions](/monetization/open-curation/for-lens-dapp/contract-specification/governance-functions)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/OtwT1ghIVjCR0MgPvSr5" %}
[Bid Functions](/monetization/open-curation/for-lens-dapp/contract-specification/bid-functions)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/7PXPR8SvOPjDYkhCjavt" %}
[Curate Functions](/monetization/open-curation/for-lens-dapp/contract-specification/curate-functions)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/uD0e2rbWtLr4AofsJje6" %}
[View Functions](/monetization/open-curation/for-lens-dapp/contract-specification/view-functions)
{% endcontent-ref %}


# Enums and Structs

## enum AuditStatus

<table><thead><tr><th width="193">Enum</th><th>Description</th></tr></thead><tbody><tr><td>Pending</td><td>The bid is currently being curated.</td></tr><tr><td><del>Refuse</del></td><td><del>The bid has been refused.</del>  <br>This field does not apply to Open Curation</td></tr><tr><td>Pass</td><td>The bid has concluded curation, and the curator with the best curation effect has already claimed the reward.</td></tr><tr><td>Cancel</td><td>The curate time for the bid has passed. And there are no curators curating for the bid</td></tr></tbody></table>

## struct BidData

<table><thead><tr><th width="198.33333333333331">Parameter</th><th width="121">Type</th><th>Description</th></tr></thead><tbody><tr><td>contentId</td><td>string</td><td>The id of original content</td></tr><tr><td>bidToken</td><td>address</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmount</td><td>uint256</td><td>The amount of bidToken</td></tr></tbody></table>

## struct Content

<table><thead><tr><th width="198.33333333333331">Parameter</th><th width="121">Type</th><th>Description</th></tr></thead><tbody><tr><td>contentId</td><td>string</td><td>The id of original content</td></tr><tr><td>bidToken</td><td>address</td><td>Token address. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAddress</td><td>address</td><td>The bid creator’s EVM-compatible address</td></tr><tr><td>bidAmount</td><td>uint256</td><td>The amount of bidToken</td></tr><tr><td>bidTime</td><td>uint256</td><td>The bid posted time</td></tr><tr><td>curatorId</td><td>uint256</td><td>The bid accepter(curator)’s Lens profile id</td></tr><tr><td>curatorContentId</td><td>uint256</td><td>The id of curated publication.</td></tr><tr><td>status</td><td>AuditState</td><td>The state of the bid. “Pending”, “Refuse”, “Pass”, “Cancel”</td></tr></tbody></table>


# Owner Functions

## setFeeCollector

The administrator can collect the fee from every bid. When one bid is complete, the FeeCollect address will collect the fee, and the rest will be sent to the curator.

`function setFeeCollector( address newsFeeCollector, uint256 newFeeRate ) external onlyOwner`

<table><thead><tr><th width="198.33333333333331">Name</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td>newsFeeCollector</td><td>address</td><td>An EVM-compatible address for collecting fees</td></tr><tr><td>newFeeRate</td><td>uint256</td><td>Fee rate charged after a bid is executed</td></tr></tbody></table>

## setGovernance

Set up administrator addresses

`function setGovernance(address gov, bool whitelist) external onlyOwner`

<table><thead><tr><th width="203.33333333333331">Name</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>address</td><td>An EVM-compatible address</td></tr><tr><td>whitelist</td><td>bool</td><td>"true" means setting as an administrator<br>"false" means revoking administrator privileges</td></tr></tbody></table>


# Governance Functions

## setLensContracts

Set LensHub address and collectModule address. Read the Lens docs for more details. <https://docs.lens.xyz/docs/deployed-contract-addresses>

`function setLensContracts( address hub, address collectModule ) external onlyGov`

<table><thead><tr><th width="213.33333333333331">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub</td><td>address</td><td>The contract address of LensHub</td></tr><tr><td>collectModule</td><td>address</td><td>The contract address of CollectMudule</td></tr></tbody></table>

## setMerkleRoot

Set up a Merkle Root Hash to verify the usage privilege of the address used for accessing Tako

`function setMerkleRoot(bytes32 newMerkleRoot) external onlyGov`

<table><thead><tr><th width="213.33333333333331">Name</th><th width="134">Type</th><th>Description</th></tr></thead><tbody><tr><td>newMerkleRoot</td><td>bytes32</td><td>A new merkle root</td></tr></tbody></table>

## whitelistBidToken

Set a whitelist of token types that can be used in transactions

`function whitelistBidToken(address token, bool whitelist) external onlyGov`

<table><thead><tr><th width="213.33333333333331">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>address</td><td>The contract address of token</td></tr><tr><td>whitelist</td><td>bool</td><td>"true" represents adding to the whitelist, while "false" represents removing from the whitelist.</td></tr></tbody></table>

## whitelistRelayer

`function whitelistRelayer(address relayer, bool whitelist) external onlyGov`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="105">Type</th><th>Description</th></tr></thead><tbody><tr><td>relayer</td><td>address</td><td>The address of relayer</td></tr><tr><td>whitelist</td><td>bool</td><td>"true" represents adding to the whitelist<br>"false" represents removing from the whitelist.</td></tr></tbody></table>

## setCurateDuration

`function setCurateDuration(uint256 duration) external onlyGov`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="105">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>uint256</td><td>The period after the Bid is posted is referred to as CurateDuration. During this period, Curators accept the Bid, and upon completing the curation, the system records and tracks the curation's effectiveness. After the CurateDuration period, the Curator with the best curation effectiveness can claim the reward.</td></tr></tbody></table>

## setRewardClaimProtectionDuration

`function setRewardClaimProtectionDuration(uint256 duration) external onlyGov`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="105">Type</th><th>Description</th></tr></thead><tbody><tr><td>duration</td><td>uint256</td><td>After CurateDuration, the Bid concludes and enters a reward claim protection period called RewardClaimProtectionDuration. During this period, only the winning Curator can claim the reward. After the protection period expires, if the Curator has not claimed the reward, the Bidder can withdraw the reward.</td></tr></tbody></table>


# Bid Functions

## bid

After the Bid is posted, anyone can accept the Bid and complete the curation. After a certain period of time, the curation effectiveness is calculated, and the Curator with the best effectiveness can claim the reward. In Open Curation, the curation method is fixed as Quote Post. The curation effectiveness is calculated by summing the number of comments and mirrors received by the Curator's Quote Post.

`function bid( BidData calldata vars, DataTypes.MerkleVerifyData calldata verifyData ) external payable nonReentrant onlyWhitelisted(verifyData)`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>vars</td><td>BidData</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>verifyData</td><td>MerkleVerifyData</td><td>Verify if the bid creator is on the whitelist<br>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## bidBatch

Similar to bid, supports batch operations.

`function bidBatch( BidData[] calldata vars, DataTypes.MerkleVerifyData calldata verifyData ) external payable nonReentrant onlyWhitelisted(verifyData)`

<table><thead><tr><th width="162.33333333333331">Name</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>vars</td><td>BidData[]</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>verifyData</td><td>MerkleVerifyData</td><td>Verify if the bid creator is on the whitelist<br>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## updateBid

`function updateBid( uint256 index, uint256 amount ) external payable nonReentrant`

<table><thead><tr><th width="162.33333333333331">Name</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>amount</td><td>uint256</td><td>The amount of bid token</td></tr></tbody></table>

## claimBackBid

Claim back the token after the bid expires

`function claimBackBid(uint256 index) external nonReentrant`

<table><thead><tr><th width="188.33333333333331">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr></tbody></table>

## claimBackBidBatch

Similar to bid, supports batch operations

`function claimBackBidBatch( uint256[] calldata indexArr ) external nonReentrant`

<table><thead><tr><th width="194.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>indexArr</td><td>uint256[]</td><td>The indexes of bids</td></tr></tbody></table>


# Curate Functions

## loanWithSig

You should do extra work to verify whether the curate works are done. Go to the API doc VerifyBid for more details

The curator can claim his reward from the booster bid after verification

This function is used to claim the reward

<mark style="color:red;">Please use the API</mark> `verifyOpenCurationBid` <mark style="color:red;">to obtain the</mark> `sig` <mark style="color:red;">and</mark> `relayer` <mark style="color:red;">information.</mark>

`function loanWithSig( uint256 index, uint256 curatorId, address relayer, string calldata contentId, DataTypes.EIP712Signature calldata sig ) external nonReentrant`

<table><thead><tr><th width="136.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256</td><td>The curator’s Lens profile id</td></tr><tr><td>relayer</td><td>address</td><td>An EVM-comptiable externally owned account, for signless feature</td></tr><tr><td>contentId</td><td>string</td><td>Tako will auto-submit a publication to Farcaster in cast, reply, and recast bids while the curator accepts the bid. The contentId is the publication Id on Farcaster</td></tr><tr><td>sig</td><td>EIP712Signature</td><td><a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></td></tr></tbody></table>

## loanWithRelayer

The winning curator needs to manually claim the reward using `loanWithSig`, but this function can help curators settle automatically.

The relayer will send the reward to the curator, eliminating the need for manual claiming. Curators only need to wait for the result after completing the curation. If they are ultimately winning, developers can call this function on your server, then they will receive the reward automatically.

`function loanWithRelayer( uint256 index, uint256 curatorId, address to, string calldata contentId ) external nonReentrant`

<table><thead><tr><th width="136.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256</td><td>The curator’s Lens profile id</td></tr><tr><td>relayer</td><td>address</td><td>An EVM-comptiable externally owned account, for signless feature</td></tr><tr><td>contentId</td><td>string</td><td>Tako will auto-submit a publication to Farcaster in cast, reply, and recast bids while the curator accepts the bid. The contentId is the publication Id on Farcaster</td></tr></tbody></table>

## loanBatchWithRelayer

Similar to loanWithRelayer, supports batch operations.

`function loanWithRelayer( uint256 index, uint256 curatorId, address to, string calldata contentId ) external nonReentrant`

<table><thead><tr><th width="136.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256[]</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256[]</td><td>The curator’s Lens profile id</td></tr><tr><td>relayer</td><td>address[]</td><td>An EVM-comptiable externally owned account, for signless feature</td></tr><tr><td>contentId</td><td>string[]</td><td>Tako will auto-submit a publication to Farcaster in cast, reply, and recast bids while the curator accepts the bid. The contentId is the publication Id on Farcaster</td></tr></tbody></table>


# View Functions

## isBidTokenWhitelisted

Check whether the token accepts a certain bidType.

`function isBidTokenWhitelisted(address token) external view returns (bool)`

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>address</td><td>The contract address of the token</td></tr></tbody></table>

## isRelayerWhitelisted

`function isRelayerWhitelisted(address wallet) external view returns (bool)`

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>wallet</td><td>address</td><td>The address of relayer</td></tr></tbody></table>

## isGovernance

Verify if the address has governance privileges

`function isGovernance(address wallet) external view returns (bool)`

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>wallet</td><td>address</td><td>The address of governance</td></tr></tbody></table>

## getContentByIndex

Get bid content by bid index.

`function getContentByIndex(uint256 index) external view returns (Content memory)`

<table><thead><tr><th width="158.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of content</td></tr></tbody></table>

## getBidCounter

Get the quantity of the bid

`function getBidCounter() external view returns (uint256)`


# APIs

> **The Tako Open Curation API is now compatible with Lens v2**

## 1. Common API

### 1.1 Helpers

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/uuf3yJ8xksw6WIcEJ8Cm" %}
[GetWhitelistInfo](/monetization/open-curation/for-lens-dapp/apis/getwhitelistinfo)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/jBpK7nSxOu5cJFNuqu3t" %}
[CheckOnchainTX](/monetization/open-curation/for-lens-dapp/apis/checkonchaintx)
{% endcontent-ref %}

## 2. APIs Based on Lens Protocol

### 2.1 Retrieve

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/7FXUXY9cRJ4ZPuhK3msE" %}
[getOpenCurationCuratorAccepted](/monetization/open-curation/for-lens-dapp/apis/getopencurationcuratoraccepted)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/RZe0HQ7OCZUY9PBz4GGf" %}
[getOpenCurationBidsCreated](/monetization/open-curation/for-lens-dapp/apis/getopencurationbidscreated)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/raIDQadWwO2F0HPUFu0Q" %}
[getOpenCurationBidsConfirmingCreated](/monetization/open-curation/for-lens-dapp/apis/getopencurationbidsconfirmingcreated)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/tsr9Dk0u452ujz13Dirb" %}
[getOpenCurationBidsPassed](/monetization/open-curation/for-lens-dapp/apis/getopencurationbidspassed)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/xzvMm41k81dYiGT4qwMo" %}
[getOpenCurationRecentActiveCurators](/monetization/open-curation/for-lens-dapp/apis/getopencurationrecentactivecurators)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/aGab0h8bwGdWq90MuD5w" %}
[GetBidsFeed](/monetization/open-curation/for-lens-dapp/apis/getbidsfeed)
{% endcontent-ref %}

### 2.2 Verify

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/vFGJcgJIKUK80KrOTgjF" %}
[verifyOpenCurationBid](/monetization/open-curation/for-lens-dapp/apis/verifyopencurationbid)
{% endcontent-ref %}

### 2.3 Statistics

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/n5QXB97CuWIJ2GUpWjVS" %}
[getOpenCurationBidsCreatedStats](/monetization/open-curation/for-lens-dapp/apis/getopencurationbidscreatedstats)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/QXmBJtsVqkSmE6rcPaDD" %}
[getOpenCurationCuratorLastBidPrice](/monetization/open-curation/for-lens-dapp/apis/getopencurationcuratorlastbidprice)
{% endcontent-ref %}

### 2.4 Helpers

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/igxxUqN9nrWlY67jIKKU" %}
[registerOpenCuration](/monetization/open-curation/for-lens-dapp/apis/registeropencuration)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/QFWZcnc0EsKHqhByGN0H" %}
[getOpenCurationIdIndexPairs](/monetization/open-curation/for-lens-dapp/apis/getopencurationidindexpairs)
{% endcontent-ref %}


# GetWhitelistInfo

## API

<table><thead><tr><th width="191">Property</th><th>Value</th></tr></thead><tbody><tr><td>API</td><td>/v2/whitelist_info/{address}</td></tr><tr><td>Title</td><td>GetWhitelistInfo</td></tr><tr><td>Description</td><td>Retrieve whitelist information for a wallet address. The information needs to be passed when invoking the whitelist verification method of the contract.</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="155">Name</th><th width="104">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>address</td><td>YES</td><td>An EVM-compatible address</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/whitelist_info/0x0233eA33f8e68Cf7B631AA6dBb81df0058DB5783' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/whitelist_info/0x0233eA33f8e68Cf7B631AA6dBb81df0058DB5783`

### Response

```json
{
  "status": "success",
  "data": {
    "address": "0x0233eA33f8e68Cf7B631AA6dBb81df0058DB5783",
    "merkleRoot": "0xb6cab120cfe96adedc28efe499f23e2289121e9558ea7755ddbc409768ff1ad4"
  }
}
```


# CheckOnchainTX

## API

<table><thead><tr><th width="169">API</th><th>/v2/hashes/confirmed</th></tr></thead><tbody><tr><td>Title</td><td>CheckOnchainTX</td></tr><tr><td>Description</td><td>To check if some transactions have been confirmed on the blockchain</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>hashes</td><td>string[]</td><td>YES</td><td>Transaction hash list</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/hashes/confirmed' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "hashes": [
      "0x50f7c8ef2bc580f0a199209001a1bac63e0fec04938cd7cde1a5dd18f41498fe"
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/hashes/confirmed`

### Response

```json
{
  "status": "success",
  "data": {
    "0x50f7c8ef2bc580f0a199209001a1bac63e0fec04938cd7cde1a5dd18f41498fe": true
  }
}
```


# getOpenCurationCuratorAccepted

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/open_curation/curator/accepted</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationCuratorAccepted</td></tr><tr><td>Description</td><td>Retrieve the curator's previous curation, and these curations are all the best and can ultimately claim rewards</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="113">Name</th><th width="82">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileId</td><td>string</td><td>NO</td><td>The Lens profile id of curator</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>cursor</td><td>int</td><td>NO</td><td>The id of bid. After calling this API, you will get the parameter next_cursor from the return value. When calling this API again, pass next_cursor as the value for the parameter cursor, which filters out data before the cursor and only queries data after the cursor.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/lens/open_curation/curator/accepted?profileId=36113&cursor=0' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/curator/accepted?profileId=36113&cursor=0`

### Response

```
{
  "status": "success",
  "data": {
    "list": [
      {
        "id": 269,
        "index": 0,
        "content_id": "0x8d10-0x06-DA-a915e490",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": "161000000000000",
        "bid_time": 1697450747,
        "curator_id": 36113,
        "curator_content_id": "0x8d11-0x07-DA-9f71b8a3",
        "state": "",
        "bid_type": "QuotedPublication",
        "profile": {
          "id": "0x8d11",
          "name": "",
          "bio": "",
          "attributes": [],
          "followNftAddress": null,
          "metadata": "",
          "isDefault": false,
          "picture": null,
          "handle": "curator1.test",
          "coverPicture": null,
          "ownedBy": "0x87A4798567135aD8fF1d380df18DBb63dD2771c8",
          "dispatcher": {
            "address": "0x6C1e1bC39b13f9E0Af9424D76De899203F47755F"
          },
          "stats": {
            "totalFollowers": 0,
            "totalFollowing": 0,
            "totalPosts": 5,
            "totalComments": 0,
            "totalMirrors": 6,
            "totalPublications": 11,
            "totalCollects": 0
          },
          "followModule": null
        },
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xcb487db8adbeef2ddb50f9fce6bf7d9c198637a02174e3bba78ab6ef1dcc5c8b",
            "event_name": "addBidEvent",
            "block_number": 41264296,
            "block_timestamp": 1697450747
          },
          "modifiBidEventPass": {
            "state": "Pass",
            "tx_hash": "0x80a2cd7177c0c5e9fc2274db5e090dba610651d52622fc015caacc1e3a3ebd27",
            "event_name": "modifiBidEvent",
            "block_number": 41291074,
            "block_timestamp": 1697512555
          }
        },
        "create_at": 1697450747,
        "update_at": 1697512555
      }
    ],
    "has_more": false,
    "next_cursor": 0
  }
}
```


# getOpenCurationBidsCreated

## API

<table><thead><tr><th width="162">API</th><th>/v2/lens/open_curation/get_bids_created</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationBidsCreated</td></tr><tr><td>Description</td><td>Retrieve the bids created by the bidders on Lens</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="139">Name</th><th width="115">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>YES</td><td>The lens profile id list of the bidders</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr><tr><td>sort</td><td>string</td><td>NO</td><td>Can sort by "bid_amount", "create_at", "update_at", default to "bid_amount"</td></tr><tr><td>sortType</td><td>string</td><td>NO</td><td>“desc” or “asc”, default to “desc”. Arrange in ascending or descending order.</td></tr><tr><td>status</td><td>string</td><td>NO</td><td>The state of bid. “Pending”, “Pass”, “Cancel”.<br>If the state is not included in the request parameters, all data will be queried.</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/get_bids_created' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "limit": 3,
    "offset": 0,
    "profileIds": [
      174
    ],
    "sort": "create_at",
    "sortType": "desc",
    "status": "Pending"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/get_bids_created`

### Response

```
{
  "status": "success",
  "data": {
    "bids": [
      {
        "id": 1266,
        "index": 15,
        "content_id": "0xae-0x08-DA-155f6c65",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0x0f9Ab2e48665487BE9e2f5EF238496Ef9213AE57",
        "bid_amount": "161000000000000",
        "bid_time": 1700647900,
        "curator_id": 0,
        "curator_content_id": "",
        "state": "Pending",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0x10945cff4d8f61e5bdd95940d563d21db73815ab7e4405aeef6a43104163155b",
            "event_name": "addBidEvent",
            "block_number": 42703524,
            "block_timestamp": 1700647900
          }
        },
        "create_at": 1700647900,
        "update_at": 1700647900
      }
    ],
    "total": 1
  }
}
```


# getOpenCurationBidsConfirmingCreated

## API

<table><thead><tr><th width="162">API</th><th>/v2/lens/open_curation/get_bids_confirming_created</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationBidsConfirmingCreated</td></tr><tr><td>Description</td><td>After bids are created and submitted, it needs to be confirmed by the Polygon network. To ensure data security, a certain number of blocks will be waited for before considering the bid data to be accurate and correct. This interface is used to query confirming bids created by bidders.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<mark style="color:red;">At least one of addresses and profileIds needs to be filled.</mark>

<table><thead><tr><th width="129">Name</th><th width="91">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>addresses</td><td>string[]</td><td>NO</td><td>The EVM-compatible address list of the bidders</td></tr><tr><td>profileIds</td><td>int[]</td><td>NO</td><td>The lens profile id list of the bidders</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/get_bids_confirming_created' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "addresses": [
      "0x0f9Ab2e48665487BE9e2f5EF238496Ef9213AE57"
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/get_bids_confirming_created`

### Response

```
{
  "status": "success",
  "data": {
    "bids": [
      {
        "index": 16,
        "content_id": "0xae-0x08-DA-4b5ae780",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0x0f9Ab2e48665487BE9e2f5EF238496Ef9213AE57",
        "bid_amount": "161000000000000",
        "bid_time": 1700648606,
        "curator_id": 0,
        "curator_content_id": "",
        "state": "Pending",
        "bid_type": "QuotedPublication",
        "block_number": 42703826,
        "others": {},
        "events": {
          "addBidEvent": {
            "block_number": 42703826,
            "block_timestamp": 1700648606,
            "event_name": "addBidEvent",
            "state": "Pending",
            "tx_hash": "0x38267ea061a651de0057fcea8ef0639e8d15346bab0a7b99c29e27536703dd70"
          }
        },
        "create_at": 1700648606,
        "update_at": 1700648606
      }
    ],
    "total": 1
  }
}
```


# getOpenCurationBidsPassed

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/open_curation/passed_bids</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationBidsPassed</td></tr><tr><td>Description</td><td>The curation has already ended, and the curator has claimed the reward</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="113">Name</th><th width="82">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offset 5 means that the first 5 rows of the query result will be skipped.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/lens/open_curation/passed_bids' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/passed_bids`

### Response

```
{
  "status": "success",
  "data": {
    "bids": [
      {
        "id": 1572,
        "index": 17,
        "content_id": "0xae-0x08-DA-bb2abe84",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0x0f9Ab2e48665487BE9e2f5EF238496Ef9213AE57",
        "bid_amount": "161000000000000",
        "bid_time": 1700649858,
        "curator_id": 180,
        "curator_content_id": "0xb4-0x08-DA-67cfa258",
        "state": "Pass",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0x663bb6ebf56899ffc15c82d668fb72584b1b9764c4cc72d6914e6da4b2060132",
            "event_name": "addBidEvent",
            "block_number": 42704370,
            "block_timestamp": 1700649858
          },
          "modifiBidEventPass": {
            "state": "Pass",
            "tx_hash": "0xfeb28aab6bd5b0cafeb88a8d17c576afb9f8e68992fcc85a0dd5e4d524c6473d",
            "event_name": "modifiBidEvent",
            "block_number": 42731575,
            "block_timestamp": 1700710323
          }
        },
        "create_at": 1700649858,
        "update_at": 1700710323
      },
      {
        "id": 809,
        "index": 12,
        "content_id": "0x01bd-0x01-DA-84dddefe",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xC439530f6A0582Bc09da70A3e52Ace7dF4b58A32",
        "bid_amount": "52000000000000000",
        "bid_time": 1700644642,
        "curator_id": 1243,
        "curator_content_id": "0x04db-0x01-DA-cc5600fc",
        "state": "Pass",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xfc3c067c63e77538641fe174001b0ae0b9b41362c00fdd65c9ef5e95fe34cfc8",
            "event_name": "addBidEvent",
            "block_number": 42702114,
            "block_timestamp": 1700644642
          },
          "modifiBidEventPass": {
            "state": "Pass",
            "tx_hash": "0xf095b966f982f1b5291f697919a4dea90659a5baa7250bd8d508d205e6155a24",
            "event_name": "modifiBidEvent",
            "block_number": 42702514,
            "block_timestamp": 1700645562
          }
        },
        "create_at": 1700644642,
        "update_at": 1700645562
      },
      {
        "id": 807,
        "index": 10,
        "content_id": "0x01bd-0x01-DA-84dddefe",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xC439530f6A0582Bc09da70A3e52Ace7dF4b58A32",
        "bid_amount": "42000000000000000",
        "bid_time": 1700644642,
        "curator_id": 445,
        "curator_content_id": "0x01bd-0x01-DA-9323c7c9",
        "state": "Pass",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xfc3c067c63e77538641fe174001b0ae0b9b41362c00fdd65c9ef5e95fe34cfc8",
            "event_name": "addBidEvent",
            "block_number": 42702114,
            "block_timestamp": 1700644642
          },
          "modifiBidEventPass": {
            "state": "Pass",
            "tx_hash": "0xf095b966f982f1b5291f697919a4dea90659a5baa7250bd8d508d205e6155a24",
            "event_name": "modifiBidEvent",
            "block_number": 42702514,
            "block_timestamp": 1700645562
          }
        },
        "create_at": 1700644642,
        "update_at": 1700645562
      }
    ],
    "total": 10
  }
}
```


# getOpenCurationRecentActiveCurators

## API

<table><thead><tr><th width="170">API</th><th>/v2/lens/open_curation/recent/curators</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationRecentActiveCurators</td></tr><tr><td>Description</td><td>Retrieve the recent curators that have accepted bids</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/lens/open_curation/recent/curators' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/recent/curators`

### Response

```
{
  "status": "success",
  "data": [
    {
      "item": {
        "content_id": "",
        "bid_time": 0,
        "curator_id": 36113,
        "curator_content_id": "",
        "id": 269,
        "index": 0,
        "bid_token": "",
        "bid_address": "",
        "bid_amount": "161000000000000",
        "bid_type": "",
        "others": null,
        "events": null,
        "create_at": 0,
        "update_at": 1697512555
      },
      "profile": {
        "id": "0x8d11",
        "name": "",
        "bio": "",
        "attributes": [],
        "followNftAddress": null,
        "metadata": "",
        "isDefault": false,
        "picture": null,
        "handle": "curator1.test",
        "coverPicture": null,
        "ownedBy": "0x87A4798567135aD8fF1d380df18DBb63dD2771c8",
        "dispatcher": {
          "address": "0x6C1e1bC39b13f9E0Af9424D76De899203F47755F"
        },
        "stats": {
          "totalFollowers": 0,
          "totalFollowing": 0,
          "totalPosts": 5,
          "totalComments": 0,
          "totalMirrors": 6,
          "totalPublications": 11,
          "totalCollects": 0
        },
        "followModule": null
      },
      "curator_info": {
        "last_bid_price": "161000000000000"
      }
    }
  ]
}
```


# GetBidsFeed

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/open_curation/all_bids</th></tr></thead><tbody><tr><td>Title</td><td>GetBidsFeed</td></tr><tr><td>Description</td><td>Retrieve the bids feed</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="139">Name</th><th width="115">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>YES</td><td>The lens profile id list of the curators for the bids</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr><tr><td>sort</td><td>string</td><td>NO</td><td>Can sort by "bid_amount", "create_at", "update_at", default to "bid_amount"</td></tr><tr><td>sortType</td><td>string</td><td>NO</td><td>“desc” or “asc”, default to “desc”. Arrange in ascending or descending order.</td></tr><tr><td>status</td><td>string</td><td>NO</td><td>The status of the bid. “Pending”, “Pass”, “Cancel”.<br>All data will be queried if the status is not included in the request parameters.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/all_bids' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "limit": 3,
    "offset": 0,
    "sort": "create_at",
    "sortType": "desc",
    "status": "Pending"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/all_bids`

### Response

```
{
  "status": "success",
  "data": {
    "bids": [
      {
        "id": 903,
        "index": 13,
        "content_id": "0xae-0x08-DA-60c4916e",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": "161000000000000",
        "bid_time": 1700644794,
        "curator_id": 0,
        "curator_content_id": "",
        "state": "Pending",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0x63a0232bbc65afc1db82f134d3a40f6b0f0e590aa57aed839766fdc36474c46c",
            "event_name": "addBidEvent",
            "block_number": 42702173,
            "block_timestamp": 1700644794
          }
        },
        "create_at": 1700644794,
        "update_at": 1700644794
      },
      {
        "id": 807,
        "index": 10,
        "content_id": "0x01bd-0x01-DA-84dddefe",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xC439530f6A0582Bc09da70A3e52Ace7dF4b58A32",
        "bid_amount": "42000000000000000",
        "bid_time": 1700644642,
        "curator_id": 0,
        "curator_content_id": "",
        "state": "Pending",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xfc3c067c63e77538641fe174001b0ae0b9b41362c00fdd65c9ef5e95fe34cfc8",
            "event_name": "addBidEvent",
            "block_number": 42702114,
            "block_timestamp": 1700644642
          }
        },
        "create_at": 1700644642,
        "update_at": 1700644642
      },
      {
        "id": 808,
        "index": 11,
        "content_id": "0x01bd-0x01-DA-84dddefe",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xC439530f6A0582Bc09da70A3e52Ace7dF4b58A32",
        "bid_amount": "13",
        "bid_time": 1700644642,
        "curator_id": 0,
        "curator_content_id": "",
        "state": "Pending",
        "bid_type": "QuotedPublication",
        "block_number": 0,
        "others": {},
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xfc3c067c63e77538641fe174001b0ae0b9b41362c00fdd65c9ef5e95fe34cfc8",
            "event_name": "addBidEvent",
            "block_number": 42702114,
            "block_timestamp": 1700644642
          }
        },
        "create_at": 1700644642,
        "update_at": 1700644642
      }
    ],
    "total": 6
  }
}
```


# verifyOpenCurationBid

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/open_curation/verify_bid</th></tr></thead><tbody><tr><td>Title</td><td>verifyOpenCurationBid</td></tr><tr><td>Description</td><td>Verify if the curator's task is completed and the curation has the best effect. The evaluation criteria for the effect are the highest sum of mirror and comment quantities in the curation quotes.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="168">Name</th><th width="111">Type</th><th width="121">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>string</td><td>YES</td><td>The curator’s EVM-compatible address</td></tr><tr><td>index</td><td>int</td><td>NO</td><td>The index of bid</td></tr><tr><td>pubId</td><td>string</td><td>YES</td><td>The id of publication created by the curator</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/verify_bid' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": "0x0f9Ab2e48665487BE9e2f5EF238496Ef9213AE57",
    "index": 17,
    "pubId": "0xb4-0x08-DA-67cfa258"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/verify_bid`

### Response

<mark style="color:red;">When calling the</mark> `loanWithSig` <mark style="color:red;">method in the contract, you need to pass the</mark> `signature` <mark style="color:red;">and</mark> `relayer` <mark style="color:red;">from the response as parameters to</mark> `loanWithSig`<mark style="color:red;">. Please refer to the contract method for specific details.</mark>

<mark style="color:red;">The</mark> `loanWithSig` <mark style="color:red;">method in the contract is used to allow a curator to claim their reward when their curation is evaluated as the best after the curation is completed.</mark>

```
{
  "status": "success",
  "data": {
    "chainId": 80001,
    "contract": "0xC158A4319BC125e315120DbDfBEa8b8343aa3234",
    "curateDuration": 700,
    "relayer": "0x197309df1f580884B5A2A75DFd842a524Fd8AC15",
    "signature": {
      "r": "0xad8ff6eb40cb644715f3d662f994064920a2671d07507cff0307b0fd1980cfd0",
      "s": "0x733e7370a5ac2a4ce154e0be21a7cfe9a9460da737f30a007529ed0c9847cfaf",
      "v": 27,
      "deadline": 1700744961
    }
  }
}
```


# getOpenCurationBidsCreatedStats

## API

<table><thead><tr><th width="169">API</th><th>/v2/lens/open_curation/get_bids_created/stats</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationBidsCreatedStats</td></tr><tr><td>Description</td><td>Analyze the relevant data of bids created on Lens</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<mark style="color:red;">At least one of addresses and profileIds needs to be filled.</mark>

<table><thead><tr><th width="145">Name</th><th width="101">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>string[]</td><td>NO</td><td>The Lens profile id list of the bidders</td></tr><tr><td>addresses</td><td>string[]</td><td>NO</td><td>The EVM-compatible address list of the bidders</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/get_bids_created/stats' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "profileIds": [
      174
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/get_bids_created/stats`

### Response

```
{
  "status": "success",
  "data": {
    "all": 3,
    "pending": 2,
    "pass": 1,
    "cancel": 0,
    "ignored": 0
  }
}
```


# getOpenCurationCuratorLastBidPrice

## API

<table><thead><tr><th width="163">API</th><th>/v2/lens/open_curation/curator/last_bid_price</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationCuratorLastBidPrice</td></tr><tr><td>Description</td><td>Retrieve the token amount from the last executed bid by the curator.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="168">Name</th><th width="80">Type</th><th width="112">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>YES</td><td>The curator’s Lens profile id list</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/curator/last_bid_price' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "profileIds": [
      180
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/curator/last_bid_price`

### Response

```
{
  "status": "success",
  "data": {
    "data": {
      "180": {
        "last_bid_price": "161000000000000"
      }
    }
  }
}
```


# registerOpenCuration

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/open_curation/register</th></tr></thead><tbody><tr><td>Title</td><td>registerOpenCuration</td></tr><tr><td>Description</td><td>After the curators complete the curation(i.e., quote the target publication on Lens), they must bind the Quoted Publication Id and Bid Index.<br>So that Tako can verify that the curators have completed the curation task.<br>This method is used to perform the binding.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="113">Name</th><th width="82">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>int</td><td>YES</td><td>The index of bid</td></tr><tr><td>pubId</td><td>string</td><td>YES</td><td>The id of Quoted Publication, such as 0x8d11-0x07-DA-1cdac4db</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/register' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "index": 17,
    "pubId": "0xb4-0x08-DA-67cfa258"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/register`

### Response

```
{
  "status": "success",
  "data": "register lens curation succeed"
}
```


# getOpenCurationIdIndexPairs

## API

<table><thead><tr><th width="168">API</th><th>/v2/lens/open_curation/id_index/pairs</th></tr></thead><tbody><tr><td>Title</td><td>getOpenCurationIdIndexPairs</td></tr><tr><td>Description</td><td>Retrieve the bid of the curation that has ended and is waiting for the curator to claim the reward</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="174">Name</th><th width="79">Type</th><th width="116">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>YES</td><td>The profile id list of the curators</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/open_curation/id_index/pairs' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "profileIds": [
      180
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/open_curation/id_index/pairs`

### Response

```
{
  "status": "success",
  "data": {
    "180": [
      {
        "index": 17,
        "pub_id": "0xb4-0x08-DA-67cfa258",
        "profile_id": 180,
        "create_at": 1700708961,
        "update_at": 1700708961,
        "state": "Pending"
      }
    ]
  }
}
```


# SDK

> **The Tako Open Curation SDK is now compatible with Lens v2**

## 1. Installing the SDK

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/xklT11nVwLjccMvh1hHV" %}
[Installing the SDK](/monetization/open-curation/for-lens-dapp/sdk/installing-the-sdk)
{% endcontent-ref %}

## 2. Reference

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/4kiLOMqsdSHD5jqIFJWc" %}
[allBids](/monetization/open-curation/for-lens-dapp/sdk/allbids)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/u999yrMjV4dvfvZ5pGsp" %}
[takoHubInfo()](/monetization/open-curation/for-lens-dapp/sdk/takohubinfo)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/ESC0ogKEv0bGXrLBKU3x" %}
[generateBidAbiData()](/monetization/open-curation/for-lens-dapp/sdk/generatebidabidata)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/De0O5VTiHe52RcXTnlde" %}
[generateBidBatchAbiData()](/monetization/open-curation/for-lens-dapp/sdk/generatebidbatchabidata)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/RStPuRmyDdwAOYJGYF7I" %}
[estimateGas()](/monetization/open-curation/for-lens-dapp/sdk/estimategas)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/xEn48vrCUFO29kBuN5pr" %}
[generateTransaction()](/monetization/open-curation/for-lens-dapp/sdk/generatetransaction)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/L5dUTsjudFWLNrH12DsG" %}
[register()](/monetization/open-curation/for-lens-dapp/sdk/register)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/VlfMvO9sfr7X2fMw2O0z" %}
[verifyBid()](/monetization/open-curation/for-lens-dapp/sdk/verifybid)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/LUpvvPqKwTHEpYzxoKpO" %}
[generateClaimRewardAbiData()](/monetization/open-curation/for-lens-dapp/sdk/generateclaimrewardabidata)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/Ei7A6aJqF2QJTutnhI87" %}
[Broken mention](broken://spaces/tlrIAINSWSu0AKPifmBQ/pages/Ei7A6aJqF2QJTutnhI87)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/HsWl3TKjo64KJEUmawEZ" %}
[curatorStatus()](/monetization/open-curation/for-lens-dapp/sdk/curatorstatus)
{% endcontent-ref %}


# Installing the SDK

The Tako Open Curation SDK can be installed using npm:

```sh
npm install tako-open-curation
```

or yarn:

```sh
yarn add tako-open-curation
```


# allBids

<table><thead><tr><th width="160">SDK</th><th>allBids</th></tr></thead><tbody><tr><td>Description</td><td>Retrieve the bids feed</td></tr><tr><td>Nature</td><td>Property of Class</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration

const query = await lensOpenCuration.allBids.DESC.status(CONSTANT.OpenCurationAllBidsStatus.Pending)
const pendingBids = await query.get()

// sorted result
// const query = await lensOpenCuration.allBids.sort('create_at').ASC.status(CONSTANT.OpenCurationAllBidsStatus.All)

// Querying by a specified quantity
// const query = await lensOpenCuration.allBids.limit(3).DESC.status(CONSTANT.OpenCurationAllBidsStatus.All)
```

{% endcode %}

## Example Returns

```json
result {
  bids: [
    {
      id: 35,
      index: 2,
      content_id: '0x01bd-0x01-DA-da16dd1b',
      bid_token: '0x0000000000000000000000000000000000000000',
      bid_address: '0xC439530f6A0582Bc09da70A3e52Ace7dF4b58A32',
      bid_amount: '120',
      bid_time: 1700210601,
      curator_id: 445,
      curator_content_id: '0x01bd-0x01-DA-29898514',
      state: 'Pass',
      bid_type: 'QuotedPublication',
      block_number: 0,
      others: {},
      events: [Object],
      create_at: 1700210601,
      update_at: 1700469727
    },
    {
      id: 36,
      index: 3,
      content_id: '0x01bd-0x01-DA-84dddefe',
      bid_token: '0x0000000000000000000000000000000000000000',
      bid_address: '0xC439530f6A0582Bc09da70A3e52Ace7dF4b58A32',
      bid_amount: '10',
      bid_time: 1700632484,
      curator_id: 0,
      curator_content_id: '',
      state: 'Pending',
      bid_type: 'QuotedPublication',
      block_number: 0,
      others: {},
      events: [Object],
      create_at: 1700632484,
      update_at: 1700632484
    }
  ],
  total: 22
}

```


# takoHubInfo()

<table><thead><tr><th width="160">SDK</th><th>takoHubInfo()</th></tr></thead><tbody><tr><td>Description</td><td>Get contract of Tako Protocol</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration

const hub = await lensOpenCuration.takoHubInfo()
```

{% endcode %}

## Example Returns

```json
{
  chain: 'mumbai',
  chain_id: 80001,
  contract: '0xC158A4319BC125e315120DbDfBEa8b8343aa3234'
}
```


# generateBidAbiData()

<table><thead><tr><th width="160">SDK</th><th>generateBidAbiData()</th></tr></thead><tbody><tr><td>Description</td><td>Generate calldata to call the Tako Open Curation Contract</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="153">Name</th><th width="104">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>contentId</td><td>string</td><td>YES</td><td>The id of publication that is wating to be curated, such as 0x8d11-0x07-DA-1cdac4db</td></tr><tr><td>bidToken</td><td>string</td><td>YES</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmount</td><td>bigint</td><td>YES</td><td>The amount of bidToken</td></tr><tr><td>merkleIndex</td><td>number</td><td>NO</td><td>(Ignore it on testnet)</td></tr><tr><td>merkleProof</td><td>string[]</td><td>NO</td><td>(Ignore it on testnet)</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration

const takoHubInfo = await lensOpenCuration.takoHubInfo();
const amount = BigInt(325); // 325 GWEI
const abiData = await lensOpenCuration.generateBidAbiData("0x47-0x01-DA-fece722d", "0x0000000000000000000000000000000000000000", amount);
```

{% endcode %}

## Example Returns

```json
0x07de204500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001450000000000000000000000000000000000000000000000000000000000000015307834372d307830312d44412d66656365373232640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000
```


# generateBidBatchAbiData()

<table><thead><tr><th width="160">SDK</th><th>generateBidBatchAbiData()</th></tr></thead><tbody><tr><td>Description</td><td>Similar to generateBidAbiData(), supports batch operations.</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="153">Name</th><th width="104">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>contentIds</td><td>string[]</td><td>YES</td><td>The id of publication that is wating to be curated, such as 0x8d11-0x07-DA-1cdac4db</td></tr><tr><td>bidTokens</td><td>string[]</td><td>YES</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmounts</td><td>bigint[]</td><td>YES</td><td>The amount of bidToken</td></tr><tr><td>merkleIndex</td><td>number</td><td>NO</td><td>(Ignore it on testnet)</td></tr><tr><td>merkleProof</td><td>string[]</td><td>NO</td><td>(Ignore it on testnet)</td></tr></tbody></table>

## Example Code

Refer to: [generateBidAbiData()](/monetization/open-curation/for-lens-dapp/sdk/generatebidabidata)


# estimateGas()

<table><thead><tr><th width="160">SDK</th><th>estimateGas()</th></tr></thead><tbody><tr><td>Description</td><td>Estimate the gas consumption for the transaction</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="101">Name</th><th width="104">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>from</td><td>string</td><td>YES</td><td>The EVM-compatible wallet address of the user</td></tr><tr><td>to</td><td>string</td><td>YES</td><td>The contract address of Tako Open Curation<br>(Use takoHubInfo() to retrieve the contract address)</td></tr><tr><td>data</td><td>string</td><td>YES</td><td>The calldata for calling the Tako Open Curation Contract</td></tr><tr><td>value</td><td>bigint</td><td>YES</td><td>Token amount</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { ethers } from 'ethers'
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const apikey = "Your Alchemy API Key"
const web3Provider = new ethers.providers.AlchemyProvider(80001, apikey)
lensOpenCuration.provider = web3Provider

const takoHubInfo = await lensOpenCuration.takoHubInfo();
const amount = BigInt(325); // 325 GWEI
const abiData = await lensOpenCuration.generateBidAbiData("0x47-0x01-DA-fece722d", "0x0000000000000000000000000000000000000000", amount);
const estimatedGas = await lensOpenCuration.estimateGas("0xaddress", takoHubInfo.contract, abiData, amount);
```

{% endcode %}

## Example Returns

{% code overflow="wrap" %}

```json
// bigint
144171n
```

{% endcode %}


# generateTransaction()

<table><thead><tr><th width="160">SDK</th><th>generateTransaction()</th></tr></thead><tbody><tr><td>Description</td><td>Generate transaction parameter to call the Tako Open Curation Contract</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="126">Name</th><th width="104">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>from</td><td>string</td><td>YES</td><td>The EVM-compatible wallet address of the user</td></tr><tr><td>abiData</td><td>string</td><td>YES</td><td>The calldata for calling the Tako Open Curation Contract</td></tr><tr><td>value</td><td>bigint</td><td>YES</td><td>Token amount</td></tr><tr><td>gasLimit</td><td>bigint</td><td>YES</td><td>Gas limit</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { ethers } from 'ethers'
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const apikey = "Your Alchemy API Key"
const web3Provider = new ethers.providers.AlchemyProvider(80001, apikey)
lensOpenCuration.provider = web3Provider

const takoHubInfo = await lensOpenCuration.takoHubInfo();
const amount = BigInt(325); // 325 GWEI
const abiData = await lensOpenCuration.generateBidAbiData("0x47-0x01-DA-4649c8f1", "0x0000000000000000000000000000000000000000", amount);
const estimatedGas = await lensOpenCuration.estimateGas("0xaddress", takoHubInfo.contract, abiData, amount);
const transaction = await lensOpenCuration.generateTransaction("0xaddress", abiData, amount, estimatedGas * BigInt(3));
```

{% endcode %}

## Example Returns

```json
{
  to: '0xC158A4319BC125e315120DbDfBEa8b8343aa3234',
  value: 325n,
  gasLimit: 432513n,
  maxPriorityFeePerGas: BigNumber { _hex: '0x59682f00', _isBigNumber: true },
  maxFeePerGas: BigNumber { _hex: '0x59682f1e', _isBigNumber: true },
  nonce: 43,
  type: 2,
  chainId: 80001,
  data: '0x07de204500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001450000000000000000000000000000000000000000000000000000000000000015307834372d307830312d44412d34363439633866310000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000'
}
```


# register()

<table><thead><tr><th width="160">SDK</th><th>register()</th></tr></thead><tbody><tr><td>Description</td><td>After the curators complete the curation(i.e., quote the target publication on Lens), they must bind the Quoted Publication Id and Bid Index.<br>So that Tako can verify that the curators have completed the curation task.<br>This method is used to perform the binding.</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="124">Name</th><th width="101">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>number</td><td>YES</td><td>The index of bid</td></tr><tr><td>pubId</td><td>string</td><td>YES</td><td>The id of Curator's Quoted Publication, such as 0x8d11-0x07-DA-1cdac4db</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { ethers } from 'ethers'
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const apikey = "Your Alchemy API Key"
const web3Provider = new ethers.providers.AlchemyProvider(80001, apikey)
lensOpenCuration.provider = web3Provider

const result = await lensOpenCuration.register(26, '0x49-0x01-DA-779542b8')
```

{% endcode %}

## Example Returns

```json
register lens curation succeed
```


# verifyBid()

<table><thead><tr><th width="160">SDK</th><th>verifyBid()</th></tr></thead><tbody><tr><td>Description</td><td>Verify if the curator's task is completed and the curation has the best effect. The evaluation criteria for the effect are the highest sum of mirror and comment quantities in the curation quotes.</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="168">Name</th><th width="111">Type</th><th width="121">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>string</td><td>YES</td><td>The curator’s EVM-compatible address</td></tr><tr><td>index</td><td>number</td><td>NO</td><td>The index of bid</td></tr><tr><td>pubId</td><td>string</td><td>YES</td><td>The id of Quote publication created by the curator</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { ethers } from 'ethers'
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const apikey = "Your Alchemy API Key"
const web3Provider = new ethers.providers.AlchemyProvider(80001, apikey)
lensOpenCuration.provider = web3Provider

const result2 = await lensOpenCuration.verifyBid('0xaddress', 27, '0xbd-0x01-DA-a8a8cbd5')
```

{% endcode %}

## Example Returns

```json
{
  chainId: 80001,
  contract: '0xC158A4319BC125e315120DbDfBEa8b8343aa3234',
  curateDuration: 700,
  relayer: '0x197309df1f580884B5A2A75DFd842a524Fd8AC15',
  signature: {
    r: '0x6a64291997eeb5630662cf07c380299e64850e1aab016387a6f36a7d995a8c42',
    s: '0x41f4198eae0bfe99a5dcb523b2d5807326146ddf54c198524eb277b954eab7b0',
    v: 28,
    deadline: 1701395889
  }
}
```


# generateClaimRewardAbiData()

<table><thead><tr><th width="160">SDK</th><th>verifyBid()</th></tr></thead><tbody><tr><td>Description</td><td><p>Generate calldata to call loanWithSig on Tako Open Curation Contarct<br>The curator can claim his reward from the booster bid after verification</p><p>This function is used to claim the reward</p></td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="136.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>number</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>number</td><td>The curator’s Lens profile id</td></tr><tr><td>relayer</td><td>string</td><td>An EVM-comptiable externally owned account, for signless feature</td></tr><tr><td>contentId</td><td>string</td><td>Tako will auto-submit a publication to Farcaster in cast, reply, and recast bids while the curator accepts the bid. The contentId is the publication Id on Farcaster</td></tr><tr><td>sig</td><td><p>object<br><br>{</p><p>  r: string,</p><p>  s: string,</p><p>  v: number,</p><p>  deadline: number</p><p>}</p></td><td><a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { ethers } from 'ethers'
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration
const apikey = "Your Alchemy API Key"
const web3Provider = new ethers.providers.AlchemyProvider(80001, apikey)
lensOpenCuration.provider = web3Provider

const profileId = 189
const bidIndex = 27
const contentId = '0xbd-0x01-DA-a8a8cbd5'
const sig = await lensOpenCuration.verifyBid('0xaddress', bidIndex, contentId)
const abiData = await lensOpenCuration.generateClaimRewardAbiData(bidIndex, profileId, sig.relayer, contentId, sig.signature);
```

{% endcode %}

## Example Returns

```json
0xfa2fd476000000000000000000000000000000000000000000000000000000000000001b00000000000000000000000000000000000000000000000000000000000000bd000000000000000000000000197309df1f580884b5a2a75dfd842a524fd8ac150000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001beb98124c99d8b8341464c7519cf97bf9c7cfe06485a6dd9bdfcdfe7aec42ab523e5c21579c58377166c65a2342a3181642d3e6d8ed5bd990517be5e719da77510000000000000000000000000000000000000000000000000000000065693fbb0000000000000000000000000000000000000000000000000000000000000015307862642d307830312d44412d61386138636264350000000000000000000000
```


# curatorStatus()

<table><thead><tr><th width="160">SDK</th><th>curatorStatus()</th></tr></thead><tbody><tr><td>Description</td><td>Check the curation status of a bid</td></tr><tr><td>Nature</td><td>Method of Class</td></tr></tbody></table>

## Parameters

<table><thead><tr><th width="136.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>number</td><td>The index of bid</td></tr><tr><td>profileId</td><td>number</td><td>The curator’s Lens profile id</td></tr></tbody></table>

## Example Code

{% code fullWidth="false" %}

```typescript
import { CONSTANT, TakoOpenCuration } from 'tako-open-curation'

const tako = new TakoOpenCuration(CONSTANT.Network.TESTNET)
const lensOpenCuration = tako.lensOpenCuration

const result = await lensOpenCuration.curatorStatus(26, 72)
```

{% endcode %}

## Example Returns

```json
{ 
  description: 'in-progress',
  index: 27,
  profileId: 189,
  status: 3
}
```

```json
{
  description: 'no register info found',
  index: 1,
  profileId: 71,
  status: 0
}
```

```json
{
  description: 'unregistered',
  index: 27,
  profileId: 186,
  status: 4
}
```


# Peer-to-Peer Curation

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/pYjKnENgNjFcRCOSIhvX" %}
[Introduction](/monetization/peer-to-peer-curation/introduction)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/OH6B9fHR4v10BBDPZeBK" %}
[API Overview](/monetization/peer-to-peer-curation/api-overview)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/Vnk5HodcBeYBf3a88lcy" %}
[For Lens dApp](/monetization/peer-to-peer-curation/for-lens-dapp)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/cn1jo0RHcSw3hGqZebR8" %}
[For Farcaster dApp](/monetization/peer-to-peer-curation/for-farcaster-dapp)
{% endcontent-ref %}


# Introduction

The integration of this peer-to-peer curation module into a dApp allows users to boost the visibility of their content. They can offer curation bids on targeted profiles whose followers they seek to engage.

It could be a sufficiently inclusivized recommendation/advertisement solution as an effective alternative to the traditional centralized, algorithm-based, platform-curated solutions. Sharing content through these value-matching curations also enhances the engagement of diverse content within an ecosystem. This allows niche yet valuable content and their creators to be easily discovered. It also offers improved monetization opportunities for content creators, allowing them to leverage their social influence.

Basically, there are two roles in this peer-to-peer curation module: Bidder and Curator:

#### Bidder

Login with a wallet address or creator profile (e.g. Lens handle). They can:

* Create a bid: set up a curation bid by specifying the curation type, target Curator, bid amount, and bid duration. Curation types can include share (mirror in Lens protocol), comment, post, or quote post.
* Update a bid: modify the bid data before a bid expires, including extending durations or increasing bid amounts.&#x20;
* Cancel a bid (Claim back): reclaim funds from the smart contract if a bid expires or the curator has accepted but didn't claim the funds within 7 days.

#### Curator

Login with a creator profile (e.g. Lens handle). They can:

* Audit a bid: decide on a status change, i.e., whether to recommend it, to a received curation bid by evaluating the content and the bid amount.
* Claim: claim the funds after accepting and executing a curation.
* Set a minimum bid: set the minimum bid amount the Curator wants to receive.
* Set disabled audit types: specify the curation types that the Curator does not want to receive.

***

#### Supported Ecosystems

{% content-ref url="/pages/Vnk5HodcBeYBf3a88lcy" %}
[For Lens dApp](/monetization/peer-to-peer-curation/for-lens-dapp)
{% endcontent-ref %}

{% content-ref url="/pages/cn1jo0RHcSw3hGqZebR8" %}
[For Farcaster dApp](/monetization/peer-to-peer-curation/for-farcaster-dapp)
{% endcontent-ref %}


# API Overview

> Tips:
>
> The Polygon network for Lens dApps
>
> The Optimistic network for Farcaster dApps

## 1. API Base Link

### Based on the contracts deployed on Polygon Mainnet & Optimistic Mainnet

[https://api.tako.so](https://testapi.takoyaki.so/)

### Based on the contracts deployed on Mumbai Testnet

[https://testapi.tako.so](https://testapi.takoyaki.so/)

## 2. How To Use

### For GET Method API

Assume you will use the API GetLensCuratorAccepted. Its route is "/v2/lens/curator/accepted".

The first step you should compose the base link with the API route:

`https://api.tako.so/v2/lens/curator/accepted?profileId=36113&cursor=0`

Please refer to the API documentation for specific parameters and requirements.

Now, you can request the full link using JavaScript, Python, cURL, etc. Then, you will receive a response from the Tako server.

### For POST method API

Like the GET method, you must pass the parameters in the request body as application/json.

## 3. Rate Limit

The cumulative number of API accesses from the same IP address should not exceed <mark style="color:red;">**60 times per minute**</mark>.

## 4. Request Format

* GET method: All parameters are included in the URL.
* POST method: All parameters are formatted as JSON data and put in the request body.

## 5. Response Format

The response is JSON format. There are four parameters at the top level:&#x20;

* status
* data
* error\_code
* error\_message

<table><thead><tr><th width="182">Parameter</th><th width="183">Data Type</th><th width="169">Visibility</th><th>Description</th></tr></thead><tbody><tr><td>status</td><td>string</td><td>Always visible</td><td>Indicate whether the API access is successful.</td></tr><tr><td>data</td><td>The return value of each API determines it.</td><td>Visible only when API access is successful</td><td>The return value of API</td></tr><tr><td>error_code</td><td>int</td><td>Visible only when API access fails</td><td>See the table “Error Code” below</td></tr><tr><td>error_message</td><td>string</td><td>Visible only when API access fails</td><td>The reason for the error</td></tr></tbody></table>

### 6. Response Example

#### When API access is successful

```json
{
    "status": "success",
    "data": {
        Object
    }
}
```

#### When API access fails

```json
{
  "status": "error",
  "error_code": 600,
  "error_msg": "The reason for error."
}
```

## 7. Error Code

<table><thead><tr><th width="122.33333333333331">Code</th><th width="208">Title</th><th>Description</th></tr></thead><tbody><tr><td>1100</td><td>InvalidRequestBody</td><td>Invalid Request Body</td></tr><tr><td>1101</td><td>InvalidParameter</td><td>Invalid Parameter</td></tr><tr><td>3000</td><td>InvalidAddress</td><td>Invalid address</td></tr><tr><td>3001</td><td>VerifyOwnerProofFail</td><td>Verify ownerProof fail</td></tr><tr><td>3002</td><td>TimeExpired</td><td>Time is expired</td></tr><tr><td>3003</td><td>TimeInvalid</td><td>Invalid time</td></tr><tr><td>3004</td><td>DuplicateVote</td><td>Duplicate vote</td></tr><tr><td>1000</td><td>InternalSystemError</td><td>System Error(1000)</td></tr><tr><td>1001</td><td>DatabaseError</td><td>System Busy(1001)</td></tr><tr><td>1002</td><td>RedisError</td><td>System Busy(1002)</td></tr><tr><td>1003</td><td>FilesystemError</td><td>System Busy(1003)</td></tr><tr><td>1004</td><td>RemoteServiceError</td><td>System Busy(1004)</td></tr></tbody></table>


# For Lens dApp

> <mark style="color:red;">**P2P Curation is only compatible with Lens v1. We recommend using Open Curation instead**</mark>

Integrate into your Lens dApps:

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/6iPHYKuB0MHrWVAr3rfU" %}
[Deployed Contract Address](/monetization/peer-to-peer-curation/for-lens-dapp/deployed-contract-address)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/vLYAi3EcLuVt5lEgVxYY" %}
[Contract Specification](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/hWN1aWjsfLL2o7EwoSxP" %}
[APIs](/monetization/peer-to-peer-curation/for-lens-dapp/apis)
{% endcontent-ref %}


# Deployed Contract Address

Note: The mainnet contract currently has a whitelist for the [Bidder](broken://pages/m6URVFC4BfHKCdFz8I8p#bidder) addresses. Apply[ here](https://form.zootools.co/go/Gku1ElD19dlnOmcExFl8). There's no whitelist for the testnet.

## 1. Polygon Mainnet

The official block explorer can be found here:

[Polygon Mainnet Block Explorer](https://polygonscan.com/)

<table><thead><tr><th width="302">Contract</th><th>Address</th></tr></thead><tbody><tr><td>TakoLensHub</td><td><a href="https://polygonscan.com/address/0x89dd34D977eF337D8045BF3d7c1Cb461750C0337">0x89dd34D977eF337D8045BF3d7c1Cb461750C0337</a></td></tr></tbody></table>

## 2. Mumbai Testnet

The official block explorer can be found here:

[Polygon Mumbai Block Explorer](https://mumbai.polygonscan.com/)

<table><thead><tr><th width="299">Contract</th><th>Address</th></tr></thead><tbody><tr><td>TakoLensHub</td><td><a href="https://mumbai.polygonscan.com/address/0x30daf74D17781f0C2aB19db687F14E3293B17E7e">0x30daf74D17781f0C2aB19db687F14E3293B17E7e</a></td></tr></tbody></table>


# Contract Specification

> <mark style="color:red;">**P2P Curation is only compatible with Lens v1. We recommend using Open Curation instead**</mark>

## Contract File

TakoLensHub.sol

## Overview

Create and receive bids using publications submitted on Lens.

If you deployed the contract independently, you can use the Admin Functions to initialize the properties for bid.

Create Bid Steps (use Bid Functions):

1. Choose the publication that you want it to be curated.
2. Compose bid data that match the contract's specifications, such as the target publication, curator's profile id, bid price, etc.
3. Send your bid transaction.

Accept Bid Steps(use Curate Functions):

1. Get all the bids sent to you.
2. Compose the accepted data that match the contract's specifications, such as the target bid.
3. Send your accepted transaction.

Use the View Functions to view the data for bid.

Github: <https://github.com/takoprotocol/contracts>

## Specification

{% content-ref url="/pages/Ycsy7kgbEkizSbz2e3jT" %}
[Enums and Structs](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification/enums-and-structs)
{% endcontent-ref %}

{% content-ref url="/pages/rYGUek1gytXzmU5yOQG3" %}
[Owner Functions](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification/owner-functions)
{% endcontent-ref %}

{% content-ref url="/pages/bs83wVzeyu0sVUQovr8A" %}
[Governance Functions](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification/governance-functions)
{% endcontent-ref %}

{% content-ref url="/pages/dilfzdATUA0sx1qLGx4v" %}
[Bid Functions](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification/bid-functions)
{% endcontent-ref %}

{% content-ref url="/pages/thWooXiVxP5OY6YwDQVB" %}
[Curate Functions](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification/curate-functions)
{% endcontent-ref %}

{% content-ref url="/pages/AFTdYNZSbCG2hs8Td4ba" %}
[View Functions](/monetization/peer-to-peer-curation/for-lens-dapp/contract-specification/view-functions)
{% endcontent-ref %}


# Enums and Structs

## enum EIP712Signature

Please read <https://eips.ethereum.org/EIPS/eip-712>

<table><thead><tr><th width="190">Enum</th><th>Description</th></tr></thead><tbody><tr><td>v</td><td>-</td></tr><tr><td>r</td><td>-</td></tr><tr><td>s</td><td>-</td></tr><tr><td>deadline</td><td>-</td></tr></tbody></table>

## enum AuditStatus

<table><thead><tr><th width="193">Enum</th><th>Description</th></tr></thead><tbody><tr><td>Pending</td><td>The bid is awaiting curator review</td></tr><tr><td>Refuse</td><td>The bid has been refused.</td></tr><tr><td>Pass</td><td>The curator accepted the bid. The transaction is succeed.</td></tr><tr><td>Cancel</td><td>The bid has been canceled.</td></tr></tbody></table>

## enum BidType

<table><thead><tr><th width="195">Enum</th><th>Description</th></tr></thead><tbody><tr><td>Post</td><td>After accepting the bid, the curator should post a new publication on Lens.</td></tr><tr><td>Comment</td><td>After accepting the bid, the curator should comment on the creator's publication on Lens.</td></tr><tr><td>Mirror</td><td>After accepting the bid, the curator should mirror the creator's publication on Lens.</td></tr></tbody></table>

## enum Platform

<table><thead><tr><th width="195">Enum</th><th>Description</th></tr></thead><tbody><tr><td>Polygon</td><td>The architecture based on Polygon</td></tr><tr><td>Momoka</td><td>The architecture based on Momoka</td></tr></tbody></table>

## struct MerkleVerifyData

<table><thead><tr><th width="195">Enum</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>The index of data</td></tr><tr><td>merkleProof</td><td>The merkle proof</td></tr></tbody></table>

## struct BidData

<table><thead><tr><th width="198.33333333333331">Parameter</th><th width="121">Type</th><th>Description</th></tr></thead><tbody><tr><td>contentURI</td><td>string</td><td>The URI for the publication used for bidding</td></tr><tr><td>profileIdPointed</td><td>uint256</td><td>Only for comment and mirror bid. The profile id to point the comment/mirror to</td></tr><tr><td>pubIdPointed</td><td>uint256</td><td>Only for comment and mirror bid. The publication ID to point the comment/mirror to</td></tr><tr><td>bidToken</td><td>address</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmount</td><td>uint256</td><td>The amount of bidToken</td></tr><tr><td>duration</td><td>uint256</td><td>The valid duration of the bid, a UNIX timestamp</td></tr><tr><td>toCurators</td><td>uint256[]</td><td>The target curator’s Lens profile ids</td></tr></tbody></table>

## struct Content

<table><thead><tr><th width="198.33333333333331">Parameter</th><th width="121">Type</th><th>Description</th></tr></thead><tbody><tr><td>contentURI</td><td>string</td><td>Only for post, comment, and mirror bids. Because these bids will create new publications on Lens, the publications should be sent to storage such as Bundlr. Then you will get the content URI.</td></tr><tr><td>profileIdPointed</td><td>uint256</td><td>Only for comment and mirror bid. The profile id to point the comment/mirror to</td></tr><tr><td>pubIdPointed</td><td>uint256</td><td>Only for comment and mirror bid. The publication ID to point the comment/mirror to</td></tr><tr><td>bidToken</td><td>address</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmount</td><td>uint256</td><td>The amount of bidToken</td></tr><tr><td>bidAddress</td><td>address</td><td>The bid creator’s EVM-compatible address</td></tr><tr><td>bidExpires</td><td>uint256</td><td>The valid duration of the bid, a UNIX timestamp</td></tr><tr><td>toCurators</td><td>uint256[]</td><td>The target curator’s Lens profile ids</td></tr><tr><td>curatorId</td><td>uint256</td><td>The bid accepter(curator)’s Lens profile id</td></tr><tr><td>curatorContentId</td><td>uint256</td><td>The id of curated publication.</td></tr><tr><td>status</td><td>AuditState</td><td>The state of the bid. “Pending”, “Refuse”, “Pass”, “Cancel”</td></tr><tr><td>bidType</td><td>bidType</td><td>The type of bid. “Post”, “Comment”, “Mirror”</td></tr></tbody></table>

## struct MomokaBidData

<table><thead><tr><th width="201.33333333333331">Parameter</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td>contentURI</td><td>string</td><td>Only for post, comment, and mirror bids. Because these bids will create new publications on Lens, the publications should be sent to storage such as Bundlr. Then you will get the content URI.</td></tr><tr><td>mirror</td><td>string</td><td>The ID of the publication that will be mirrored</td></tr><tr><td>commentOn</td><td>string</td><td>The ID of the publication that will be commented</td></tr><tr><td>bidToken</td><td>address</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmount</td><td>uint256</td><td>The amount of bidToken</td></tr><tr><td>duration</td><td>uint256</td><td>The valid duration of the bid, a UNIX timestamp</td></tr><tr><td>toCurators</td><td>uint256[]</td><td>The target curator’s Lens profile ids</td></tr></tbody></table>

## struct MomokaContent

<table><thead><tr><th width="205.33333333333331">Parameter</th><th width="130">Type</th><th>Description</th></tr></thead><tbody><tr><td>contentURI</td><td>string</td><td>Only for post, comment, and mirror bids. Because these bids will create new publications on Lens, the publications should be sent to storage such as Bundlr. Then you will get the content URI.</td></tr><tr><td>mirror</td><td>string</td><td>The ID of the publication that will be mirrored</td></tr><tr><td>commentOn</td><td>string</td><td>The ID of the publication that will be commented</td></tr><tr><td>bidToken</td><td>address</td><td>The address of token. Default to 0x0000000000000000000000000000000000000000 , namely Matic</td></tr><tr><td>bidAmount</td><td>uint256</td><td>The amount of bidToken</td></tr><tr><td>bidAddress</td><td>address</td><td>The bid creator’s EVM-compatible address</td></tr><tr><td>bidExpires</td><td>uint256</td><td>The valid duration of the bid, a UNIX timestamp</td></tr><tr><td>toCurators</td><td>uint256[]</td><td>The target curator’s Lens profile ids</td></tr><tr><td>curatorId</td><td>uint256</td><td>The bid accepter(curator)’s Lens profile id</td></tr><tr><td>curatorContentId</td><td>string</td><td>The id of curated publication.</td></tr><tr><td>status</td><td>AuditStatus</td><td>The state of the bid. “Pending”, “Refuse”, “Pass”, “Cancel”</td></tr><tr><td>bidType</td><td>BidType</td><td>The type of bid. “Post”, “Comment”, “Mirror”</td></tr></tbody></table>


# Owner Functions

## setFeeCollector

The administrator can collect the fee from every bid. When one bid is complete, the FeeCollect address will collect the fee, and the rest will be sent to the curator.

`function setFeeCollector( address newsFeeCollector, uint256 newFeeRate ) external onlyOwner`

<table><thead><tr><th width="198.33333333333331">Name</th><th width="113">Type</th><th>Description</th></tr></thead><tbody><tr><td>newsFeeCollector</td><td>address</td><td>An EVM-compatible address for collecting fees</td></tr><tr><td>newFeeRate</td><td>uint256</td><td>Fee rate charged after a bid is executed</td></tr></tbody></table>

## setGovernance

Set up administrator addresses

`function setGovernance(address gov, bool whitelist) external onlyOwner`

<table><thead><tr><th width="203.33333333333331">Name</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td>gov</td><td>address</td><td>An EVM-compatible address</td></tr><tr><td>whitelist</td><td>bool</td><td>"true" means setting as an administrator<br>"false" means revoking administrator privileges</td></tr></tbody></table>


# Governance Functions

## setLensContracts

Set LensHub address and collectModule address. Read the Lens docs for more details. <https://docs.lens.xyz/docs/deployed-contract-addresses>

`function setLensContracts( address hub, address collectModule ) external onlyGov`

<table><thead><tr><th width="213.33333333333331">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>hub</td><td>address</td><td>The contract address of LensHub</td></tr><tr><td>collectModule</td><td>address</td><td>The contract address of CollectMudule</td></tr></tbody></table>

## setMerkleRoot

Set up a Merkle Root Hash to verify the usage privilege of the address used for accessing Tako

`function setMerkleRoot(bytes32 newMerkleRoot) external onlyGov`

<table><thead><tr><th width="213.33333333333331">Name</th><th width="134">Type</th><th>Description</th></tr></thead><tbody><tr><td>newMerkleRoot</td><td>bytes32</td><td>A new merkle root</td></tr></tbody></table>

## whitelistBidToken

Set a whitelist of token types that can be used in transactions

`function whitelistBidToken(address token, bool whitelist) external onlyGov`

<table><thead><tr><th width="213.33333333333331">Name</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>address</td><td>The contract address of token</td></tr><tr><td>whitelist</td><td>bool</td><td>"true" represents adding to the whitelist, while "false" represents removing from the whitelist.</td></tr></tbody></table>

## whitelistRelayer

`function whitelistRelayer(address relayer, bool whitelist) external onlyGov`

<table><thead><tr><th width="211.33333333333331">Name</th><th width="105">Type</th><th>Description</th></tr></thead><tbody><tr><td>relayer</td><td>address</td><td>The address of relayer</td></tr><tr><td>whitelist</td><td>bool</td><td>"true" represents adding to the whitelist<br>"false" represents removing from the whitelist.</td></tr></tbody></table>

## setToCuratorLimit

The bid can be sent to multiple curators at one time, and this function can limit the number of curators.

`function setToCuratorLimit(uint8 counter) external onlyGov`

<table><thead><tr><th width="200.33333333333331">Name</th><th width="117">Type</th><th>Description</th></tr></thead><tbody><tr><td>counter</td><td>uint8</td><td>Maximum number of target curators</td></tr></tbody></table>

## setMaxDuration

Bids can be set with a valid duration, and this method can restrict the maximum valid time

`function setMaxDuration(uint256 max) external onlyGov`

<table><thead><tr><th width="203.33333333333331">Name</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td>max</td><td>uint256</td><td>Maximum valid duration for a bid</td></tr></tbody></table>


# Bid Functions

## bid

The creators hope more people can read their publications. So they need to boost their publications, and Tako provides the boost feature. The bidders(namely the creators) can send a bid to curators (such as a KOL in some fields), and there are three types of bids: Post, Comment, and Mirror. After accepting the Post bid, the curator should post a new publication on Lens. After accepting the Comment bid, the curator should comment on the creator's publication on Lens. After accepting the Mirror bid, the curator should mirror the creator's publication on Lens. Then more and more people will read your publication.

`function bid( BidData calldata vars, BidType bidType, DataTypes.MerkleVerifyData calldata verifyData ) external payable nonReentrant onlyWhitelisted(verifyData)`

<table><thead><tr><th width="160.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>vars</td><td>BidData</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>bidType</td><td>BidType</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>verifyData</td><td>MerkleVerifyData</td><td>Verify if the bid creator is on the whitelist<br>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## bidBatch

Similar to bid, supports batch operations.

`function bidBatch(BidData[] calldata vars, BidType[] calldata bidType, DataTypes.MerkleVerifyData calldata verifyData) external payable nonReentrant onlyWhitelisted(verifyData)`

<table><thead><tr><th width="162.33333333333331">Name</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>vars</td><td>BidData[]</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>bidType</td><td>BidType[]</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>verifyData</td><td>MerkleVerifyData</td><td>Verify if the bid creator is on the whitelist<br>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## bidMomoka

Similar to bid

Momoka is now running for Lens. The user’s publications are possibly sent to the Momoka system or Polygon (the old mechanism). So part of the publications are from the Momoka, and the others are from the Polygon. The data on Momoka and Polygon is separate. So the users cannot comment or mirror using Polygon for the Momoka publications. Suppose the bidder wants the curator to comment on or mirror a Momoka publication. The comment or mirror result will be sent to Momoka after the curator accepts the bid. Because Lens does not allow users to comment or mirror Momoka publications using Polygon

So please choose the function bid or the function bidMomoka according to the actual situation.

`function bidMomoka(MomokaBidData calldata vars, BidType bidType, DataTypes.MerkleVerifyData calldata verifyData) external payable nonReentrant onlyWhitelisted(verifyData)`

<table><thead><tr><th width="168.33333333333331">Name</th><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td>vars</td><td>MomokaBidData</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>bidType</td><td>BidType</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>verifyData</td><td>MerkleVerifyData</td><td>Verify if the bid creator is on the whitelist<br>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## bidMomokaBatch

Similar to bidMomoka, supports batch operations.

`function bidMomokaBatch(MomokaBidData[] calldata vars, BidType[] calldata bidType, DataTypes.MerkleVerifyData calldata verifyData) external payable nonReentrant onlyWhitelisted(verifyData)`

<table><thead><tr><th width="178.33333333333331">Name</th><th width="171">Type</th><th>Description</th></tr></thead><tbody><tr><td>vars</td><td>MomokaBidData[]</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>bidType</td><td>BidType[]</td><td>Go to the page “Enums and Functions” for more details</td></tr><tr><td>verifyData</td><td>MerkleVerifyData</td><td>Verify if the bid creator is on the whitelist<br>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## updateBid

Can only update duration and amount.

`function updateBid(uint256 index, uint256 duration, uint256 amount) external payable nonReentrant`

<table><thead><tr><th width="179.33333333333331">Name</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>duration</td><td>uint256</td><td>The valid duration of the bid, a UNIX timestamp</td></tr><tr><td>amount</td><td>uint256</td><td>The amount of bid token</td></tr></tbody></table>

## updateBidMomoka

Can only update duration and amount.

`function updateBidMomoka(uint256 index, uint256 duration, uint256 amount) external payable nonReentrant`

<table><thead><tr><th width="186.33333333333331">Name</th><th width="174">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>duration</td><td>uint256</td><td>The valid duration of the bid, a UNIX timestamp</td></tr><tr><td>amount</td><td>uint256</td><td>The amount of bid token</td></tr></tbody></table>

## claimBackBid

Claim back the token after the bid expires

`function claimBackBid(uint256 index) external nonReentrant`

<table><thead><tr><th width="188.33333333333331">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr></tbody></table>

## claimBackBidBatch

Similar to bid, supports batch operations

`function claimBackBidBatch( uint256[] calldata indexArr ) external nonReentrant`

<table><thead><tr><th width="194.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>indexArr</td><td>uint256[]</td><td>The indexes of bids</td></tr></tbody></table>

## claimBackBidMomoka

Claim back the token after the bid expires

`function claimBackBidMomoka(uint256 index) external nonReentrant`

<table><thead><tr><th width="188.33333333333331">Name</th><th width="173">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr></tbody></table>

## claimBackBidMomokaBatch

Similar to bid, supports batch operations

`function claimBackBidMomokaBatch( uint256[] calldata indexArr ) external nonReentrant`

<table><thead><tr><th width="194.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>indexArr</td><td>uint256[]</td><td>The indexes of bids</td></tr></tbody></table>


# Curate Functions

## settings

Read the table below for more details

`function settings(address token, uint256 min, bool[] calldata disableAuditTypes) external`

<table><thead><tr><th width="214.33333333333331">Name</th><th width="142">Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>address</td><td>The accepted token address</td></tr><tr><td>min</td><td>uint256</td><td>The minimum accepted token amount</td></tr><tr><td>disableAuditTypes</td><td>bool[]</td><td>For the accepted BidType (including Post, Comment, Mirror), please fill in True or False in the order of Post, Comment, Mirror. For example, if Curator only accepts the Comment type of Bid, fill in [false, true, false]</td></tr></tbody></table>

## setMinBid

Read the table below for more details

`function setMinBid(address token, uint256 min) external`

<table><thead><tr><th width="155.33333333333331">Name</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>address</td><td>The accepted token address</td></tr><tr><td>min</td><td>uint256</td><td>The minimum accepted token amount</td></tr></tbody></table>

## setDisableAuditTypes

Read the table below for more details

`function setDisableAuditTypes(bool[] calldata disableAuditTypes) external`

<table><thead><tr><th width="210.33333333333331">Name</th><th width="142">Type</th><th>Description</th></tr></thead><tbody><tr><td>disableAuditTypes</td><td>bool[]</td><td>For the accepted BidType (including Post, Comment, Mirror), please fill in True or False in the order of Post, Comment, Mirror. For example, if Curator only accepts the Comment type of Bid, fill in [false, true, false]</td></tr></tbody></table>

## auditBidPost

Accept the bid, the curator will collect the token from the bid, and Tako will automatically send a publication on Lens for the curator

`function auditBidPost(uint256 index, uint256 curatorId, DataTypes.EIP712Signature calldata sig) external nonReentrant`

<table><thead><tr><th width="156.33333333333331">Name</th><th width="167">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256</td><td>The curator’s Lens profile id</td></tr><tr><td>sig</td><td>EIP712Signagure</td><td><a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></td></tr></tbody></table>

## auditBidMirror

Accept the bid, the curator will collect the token from the bid, and Tako will automatically send a publication on Lens for the curator

`function auditBidMirror(uint256 index, uint256 curatorId, DataTypes.EIP712Signature calldata sig) external nonReentrant`

<table><thead><tr><th width="149.33333333333331">Name</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256</td><td>The curator’s Lens profile id</td></tr><tr><td>sig</td><td>EIP712Signagure</td><td><a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></td></tr></tbody></table>

## auditBidComment

Accept the bid, the curator will collect the token from the bid, and Tako will automatically send a publication on Lens for the curator

`function auditBidComment(uint256 index, uint256 curatorId, DataTypes.EIP712Signature calldata sig) external nonReentrant`

<table><thead><tr><th width="144.33333333333331">Name</th><th width="164">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256</td><td>The curator’s Lens profile id</td></tr><tr><td>sig</td><td>EIP712Signagure</td><td><a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></td></tr></tbody></table>

## loanWithSig

Momoka is now running for Lens. The user’s publications are possibly sent to the Momoka system or Polygon (the old mechanism).&#x20;

So part of the publications are from the Momoka, and the others are from the Polygon. The data on Momoka and Polygon is separate. So the users cannot comment or mirror using Polygon for the Momoka publications.&#x20;

Suppose the booster wants the curator to comment on or mirror a Momoka publication. The comment or mirror result will be sent to Momoka after the curator accepts the bid. Because Lens does not allow users to comment or mirror Momoka publications using Polygon.&#x20;

Tako will do all the curate works for curators, such as comment, mirror, etc. It will be straightforward if Tako does all the work using Polygon because they all happen in Polygon.&#x20;

But if Tako has to use Momoka, it won’t be easy because Momoka and Polygon are separate.&#x20;

So it would be best to do extra work to verify whether the curate works are done. Go to the API doc VerifyBid for more detail.&#x20;

The curator can claim his reward from the booster bid after verification.

This function is used to claim the reward.

<mark style="color:red;">Please use the API</mark> `verifyOpenCurationBid` <mark style="color:red;">to obtain the</mark> `sig` <mark style="color:red;">and</mark> `relayer` <mark style="color:red;">information.</mark>

`function loanWithSig(uint256 index, uint256 curatorId, address relayer, string calldata contentId, DataTypes.EIP712Signature calldata sig) external nonReentrant`

<table><thead><tr><th width="136.33333333333331">Name</th><th width="169">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of bid</td></tr><tr><td>curatorId</td><td>uint256</td><td>The curator’s Lens profile id</td></tr><tr><td>relayer</td><td>address</td><td>An EVM-comptiable externally owned account, for signless feature</td></tr><tr><td>contentId</td><td>string</td><td>Tako will auto-submit a publication to Lens in post, comment, and mirror bids while the curator accepts the bid. The contentId is the publication Id on Lens</td></tr><tr><td>sig</td><td>EIP712Signature</td><td><a href="https://eips.ethereum.org/EIPS/eip-712">https://eips.ethereum.org/EIPS/eip-712</a></td></tr></tbody></table>


# View Functions

## getMinBidAmount

Retrieve the minimum bid token amount accepted by the curator.

`function getMinBidAmount(address wallet, address token) external view returns (uint256)`

<table><thead><tr><th width="148.33333333333331">Parameterss</th><th width="103">Type</th><th>Description</th></tr></thead><tbody><tr><td>wallet</td><td>address</td><td>An EVM-compatible address, namely Tako account</td></tr><tr><td>token</td><td>address</td><td>The accepted token address</td></tr></tbody></table>

## getDisableAcceptType

Retrieve whether the curator accepts a certain bidType.

`function getDisableAcceptType(address wallet, BidType bidType) external view returns (bool)`

<table><thead><tr><th width="150.33333333333331">Parameters</th><th width="107">Type</th><th>Description</th></tr></thead><tbody><tr><td>wallet</td><td>address</td><td>An EVM-compatible address, namely Tako account</td></tr><tr><td>bidType</td><td>BidType</td><td>Go to the page “Enums and Functions” for more details</td></tr></tbody></table>

## isBidTokenWhitelisted

Retrieve whether the token accepts a certain bidType.

`function isBidTokenWhitelisted(address token) external view returns (bool)`

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>token</td><td>address</td><td>The contract address of the token</td></tr></tbody></table>

## isRelayerWhitelisted

`function isRelayerWhitelisted(address wallet) external view returns (bool)`

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>wallet</td><td>address</td><td>The address of relayer</td></tr></tbody></table>

## isGovernance

Verify if the address has governance privileges

`function isGovernance(address wallet) external view returns (bool)`

<table><thead><tr><th width="157.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>wallet</td><td>address</td><td>The address of governance</td></tr></tbody></table>

## getContentByIndex

Get bid content by bid index.

`function getContentByIndex(uint256 index) external view returns (Content memory)`

<table><thead><tr><th width="158.33333333333331">Parameters</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of content (not Momoka)</td></tr></tbody></table>

## getMomokaContentByIndex

Get bid content by bid index.

`function getMomokaContentByIndex(uint256 index) external view returns (MomokaContent memory)`

<table><thead><tr><th width="163">Parameters</th><th width="108.33333333333331">Type</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>uint256</td><td>The index of content</td></tr></tbody></table>

## getBidCounter

Get the quantity of the bid (not Momoka).

`function getBidCounter() external view returns (uint256)`

## getMomokaBidCunter

Get the quantity of the Momoka bid.

`function getMomokaBidCunter() external view returns (uint256)`


# APIs

This is API v2, the latest version

> <mark style="color:red;">**P2P Curation is only compatible with Lens v1. We recommend using Open Curation instead**</mark>

## 1. Common API

### 1.1 Authentication

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/9Nt3ASBlApqJ2OZaEeEC" %}
[GetToken](/monetization/peer-to-peer-curation/for-lens-dapp/apis/gettoken)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/2z4dv2mDufUvGZcm7N74" %}
[RefreshToken](/monetization/peer-to-peer-curation/for-lens-dapp/apis/refreshtoken)
{% endcontent-ref %}

### 1.2 Helpers

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/TOoJDJpoKRKEWp3iOx11" %}
[GetWhitelistInfo](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getwhitelistinfo)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/b5JKF0QXgnq0NVwTCdMP" %}
[SearchProfile](/monetization/peer-to-peer-curation/for-lens-dapp/apis/searchprofile)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/4gJ6HDhb087FBB7rVeWj" %}
[CheckOnchainTX](/monetization/peer-to-peer-curation/for-lens-dapp/apis/checkonchaintx)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/HXRC0i05AW7dNpy1Px6T" %}
[GetRecentActiveCurators](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getrecentactivecurators)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/vUTCJumSs9Pavr4uTpxW" %}
[ActiveStatistics](/monetization/peer-to-peer-curation/for-lens-dapp/apis/activestatistics)
{% endcontent-ref %}

## 2. APIs Based on Lens Protocol

### 2.1 Retrieve

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/gDjkFSZ1BYcqSqxuWbPm" %}
[GetLensCuratorAccepted](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlenscuratoraccepted)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/LdBrtyDHe7YXLsxVVGmF" %}
[GetLensBidsCreated](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidscreated)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/bwvuaiJdb2NNWoA8hvXV" %}
[GetLensBidsReceived](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidsreceived)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/0OW6AtKmjHaZgCzFk87l" %}
[GetLensBidsConfirmingCreated](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidsconfirmingcreated)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/OLM94ANCFKhqUYv2Rf79" %}
[GetLensBidsConfirmingReceived](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidsconfirmingreceived)
{% endcontent-ref %}

### 2.2 Verify

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/jx3pRgelFeQL3rTkK0yl" %}
[VerifyLensBid](/monetization/peer-to-peer-curation/for-lens-dapp/apis/verifylensbid)
{% endcontent-ref %}

### 2.3 Ignore

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/4wk9rZUIag8eX8i8eUvu" %}
[IgnoreLensBid](/monetization/peer-to-peer-curation/for-lens-dapp/apis/ignorelensbid)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/fg6alBbXYpGmcRyTu0RT" %}
[GetLensBidsIgnored](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidsignored)
{% endcontent-ref %}

### 2.4 Statistics

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/lcwl13yy7kOey5Wp7Cr4" %}
[GetLensBidsCreatedStats](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidscreatedstats)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/5XuIYrvJzy1cjbRVIMzn" %}
[GetLensBidsReceivedStats](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlensbidsreceivedstats)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/sYB0UkNpJ4RVykJB8eyK" %}
[GetLensCuratorLastBidPrice](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlenscuratorlastbidprice)
{% endcontent-ref %}

### 2.5 Helpers

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/aCx0aFwIQrTpNC41OyfO" %}
[GetLensPubIndexPairs](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlenspubindexpairs)
{% endcontent-ref %}

{% content-ref url="/spaces/tlrIAINSWSu0AKPifmBQ/pages/cY65xlrAvCTNyVIVMWTM" %}
[GetLensPubIds](/monetization/peer-to-peer-curation/for-lens-dapp/apis/getlenspubids)
{% endcontent-ref %}


# GetToken

## API

<table><thead><tr><th width="167">Property</th><th>Value</th></tr></thead><tbody><tr><td>API</td><td>/v2/token</td></tr><tr><td>Title</td><td>GetToken</td></tr><tr><td>Description</td><td>Sign in Tako</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="119">Name</th><th width="86">Type</th><th width="72">Required</th><th>Description</th></tr></thead><tbody><tr><td>message</td><td>string</td><td>YES</td><td><p>Format: </p><p><mark style="color:red;"><code>\nACCOUNT:\n{EVM-compatible Address}\nISSUED AT:\n{Time in RFC3339 format}\n\n</code></mark></p><p></p><p>NOTE: The message structure above must be included, additional content can be added at the beginning and end of the message.</p><p></p><p>For example: </p><p><mark style="color:red;"><code>Tako wants you to sign in with your Ethereum account.\n\nThis request will not trigger a blockchain transaction or cost any gas fees.\n\nACCOUNT:\n0x4DD3DB5d0B9aAf0B0a2fBD37a489d2f0e3F234A9\n\nISSUED AT:\n2023-08-01T10:29:31.000Z\n</code></mark></p><p></p><p>What looks like on the user’s wallet signing page, such as Metamask: </p><p><mark style="color:red;"><code>Tako wants you to sign in with your Ethereum account.</code></mark></p><p></p><p><mark style="color:red;"><code>This request will not trigger a blockchain transaction or cost any gas fees.</code></mark></p><p></p><p><mark style="color:red;"><code>ACCOUNT:</code></mark></p><p><mark style="color:red;"><code>0x4DD3DB5d0B9aAf0B0a2fBD37a489d2f0e3F234A9</code></mark></p><p></p><p><mark style="color:red;"><code>ISSUED AT:</code></mark></p><p><mark style="color:red;"><code>2023-08-01T10:29:31.000Z</code></mark></p><p></p><p></p></td></tr><tr><td>signature</td><td>string</td><td>YES</td><td>Elliptic curve signing of the message.</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/token' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "message": "Tako wants you to sign in with your Ethereum account.\n\nThis request will not trigger a blockchain transaction or cost any gas fees.\n\nACCOUNT:\n0x4DD3DB5d0B9aAf0B0a2fBD37a489d2f0e3F234A9\n\nISSUED AT:\n2023-08-01T10:29:31.000Z\n\n",
    "signature": "0xa480712751eea94815608cd58a153b6380608d2b79439d9033eb936f9a23ef8445c59b3f60f76b0b411e67798e0a3c92750fda60fc15699cf5f247d3f3435ce31b"
  }'
```

#### Request URL

`https://api.tako.so/v2/token`

### Response

> NOTE: The token is the only credential to access APIs, so you must save it securely. Its validity period is `3600` seconds. You can use the refresh\_token to refresh the token. Its validity period is `86400` seconds.

```json
{
  "status": "success",
  "data": {
    "token_type": "Bearer",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InRva2VuIiwiZXhwIjoxNjkwOTYzNDQ3fQ.VeRSLf-8sEb6nsdieGBuJI8wktCyJPKzTLx-opCX7x4",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InJlZnJlc2hfdG9rZW4iLCJleHAiOjE2OTEwNDYyNDd9.ghFd7X-FHnYW16VWyi-75tzEh5L_r06vjAIo3kKcGKM",
    "expires_in": 3600
  }
}
```


# RefreshToken

## API

<table><thead><tr><th width="191">Property</th><th>Value</th></tr></thead><tbody><tr><td>API</td><td>/v2/refresh_token</td></tr><tr><td>Title</td><td>RefreshToken</td></tr><tr><td>Description</td><td>For refreshing token</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="155">Name</th><th width="104">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>refresh_token</td><td>string</td><td>YES</td><td>You can acquire the refresh_token by the API GetToken.</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/refresh_token' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InJlZnJlc2hfdG9rZW4iLCJleHAiOjE2OTEwNDYyNDd9.ghFd7X-FHnYW16VWyi-75tzEh5L_r06vjAIo3kKcGKM"
  }'
```

#### Request URL

`https://api.tako.so/v2/refresh_token`

### Response

> NOTE: The token is the only credential to access APIs, so you must save it securely. Its validity period is `3600` seconds. You can use the refresh\_token to refresh the token. Its validity period is `86400` seconds.

```json
{
  "status": "success",
  "data": {
    "token_type": "Bearer",
    "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InRva2VuIiwiZXhwIjoxNjkwOTYzNzQyfQ.p822O9AwphgUSftpUIswjNtW7BjW8CQQ3u1yydlyMGM",
    "refresh_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg0REQzREI1ZDBCOWFBZjBCMGEyZkJEMzdhNDg5ZDJmMGUzRjIzNEE5IiwidHlwZSI6InJlZnJlc2hfdG9rZW4iLCJleHAiOjE2OTEwNDY1NDJ9.El2EHD_3PhK_3MGiE_bSxbW2IyTJHn3xe3B0rVGQbWs",
    "expires_in": 3600
  }
}
```


# GetWhitelistInfo

## API

<table><thead><tr><th width="191">Property</th><th>Value</th></tr></thead><tbody><tr><td>API</td><td>/v2/whitelist_info/{address}</td></tr><tr><td>Title</td><td>GetWhitelistInfo</td></tr><tr><td>Description</td><td>Retrieve whitelist information for a wallet address. The information needs to be passed when invoking the whitelist verification method of the contract.</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="155">Name</th><th width="104">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>address</td><td>YES</td><td>An EVM-compatible address</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/whitelist_info/0x0233eA33f8e68Cf7B631AA6dBb81df0058DB5783' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/whitelist_info/0x0233eA33f8e68Cf7B631AA6dBb81df0058DB5783`

### Response

```json
{
  "status": "success",
  "data": {
    "address": "0x0233eA33f8e68Cf7B631AA6dBb81df0058DB5783",
    "merkleRoot": "0xb6cab120cfe96adedc28efe499f23e2289121e9558ea7755ddbc409768ff1ad4"
  }
}
```


# SearchProfile

## API

<table><thead><tr><th width="169">API</th><th>/v2/{ecosystem}/search</th></tr></thead><tbody><tr><td>Title</td><td>SearchProfile</td></tr><tr><td>Description</td><td>Search the profiles on the social graph according to Lens handle, Lens profile id, Farcaster FName, and Farcaster FID</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>keyword</td><td>string</td><td>YES</td><td> Lens handle, Lens profile id, Farcaster FName, and Farcaster FID, such as curator.lens, 36112, etc</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/farcaster/search?keyword=tako' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/lens/search?keyword=tako`

### Response

```json
{
  "status": "success",
  "data": {
    "items": [
      {
        "activeOnFcNetwork": false,
        "displayName": "haltakov.eth",
        "fid": 2382,
        "followerCount": 98,
        "followingCount": 58,
        "lastAccept": {
          "price": 0,
          "token": "0x0000000000000000000000000000000000000000"
        },
        "ownedBy": "0xaa66Ae4447EE6db27145FeF3d3Bd2F61e3a616Ee",
        "pfp": {
          "url": "https://i.imgur.com/sT1N1mj.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "mentions": [],
            "text": "Used to make BMWs drive themselves. Now, I make web3 easier at Fr0ntierX"
          },
          "location": {
            "description": "",
            "placeId": ""
          }
        },
        "username": "vlad",
        "viewerContext": {
          "canSendDirectCasts": false,
          "followedBy": false,
          "following": false
        }
      },
      {
        "activeOnFcNetwork": false,
        "displayName": "Nikita",
        "fid": 5184,
        "followerCount": 39,
        "followingCount": 10,
        "lastAccept": {
          "price": 0,
          "token": "0x0000000000000000000000000000000000000000"
        },
        "ownedBy": "0xCD964730c1c94Bb2a098f328127e1A27acB7e49b",
        "pfp": {
          "url": "https://pbs.twimg.com/profile_images/1588990084400939008/KsJwJ7jm_400x400.png",
          "verified": false
        },
        "profile": {
          "bio": {
            "mentions": [],
            "text": "web3 brand designer at @ sauced.xyz  linktr.ee/pxrxnoid"
          },
          "location": {
            "description": "",
            "placeId": ""
          }
        },
        "username": "nikitakoshi",
        "viewerContext": {
          "canSendDirectCasts": false,
          "followedBy": false,
          "following": false
        }
      },
      {
        "activeOnFcNetwork": false,
        "displayName": "w i l l",
        "fid": 10271,
        "followerCount": 19,
        "followingCount": 57,
        "lastAccept": {
          "price": 0,
          "token": "0x0000000000000000000000000000000000000000"
        },
        "ownedBy": "0x303CC3F9192b474530D6e33aBcd6184eacF6E716",
        "pfp": {
          "url": "https://i.imgur.com/3cwEfBw.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "mentions": [],
            "text": ""
          },
          "location": {
            "description": "",
            "placeId": ""
          }
        },
        "username": "metakosmia",
        "viewerContext": {
          "canSendDirectCasts": false,
          "followedBy": false,
          "following": false
        }
      },
      {
        "activeOnFcNetwork": false,
        "displayName": "Tako Protocol ",
        "fid": 13475,
        "followerCount": 92,
        "followingCount": 13,
        "lastAccept": {
          "price": 0,
          "token": "0x0000000000000000000000000000000000000000"
        },
        "ownedBy": "0x851a87CaAF75024FDF4AEb05553fEd48b033F9fE",
        "pfp": {
          "url": "https://i.imgur.com/0XaYzjI.jpg",
          "verified": false
        },
        "profile": {
          "bio": {
            "mentions": [],
            "text": "Building The Open Social Recommendation Layer. \n\nRecommend, Advertise & Curate On Web3 Social.\n\nTako.so"
          },
          "location": {
            "description": "Singapore",
            "placeId": "ChIJyY4rtGcX2jERIKTarqz3AAQ"
          }
        },
        "username": "tako",
        "viewerContext": {
          "canSendDirectCasts": false,
          "followedBy": false,
          "following": false
        }
      }
    ]
  }
}
```


# CheckOnchainTX

## API

<table><thead><tr><th width="169">API</th><th>/v2/hashes/confirmed</th></tr></thead><tbody><tr><td>Title</td><td>CheckOnchainTX</td></tr><tr><td>Description</td><td>To check if some transactions have been confirmed on the blockchain</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="178">Name</th><th width="99">Type</th><th width="113">Required</th><th>Description</th></tr></thead><tbody><tr><td>hashes</td><td>string[]</td><td>YES</td><td>Transaction hash list</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/hashes/confirmed' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "hashes": [
      "0x50f7c8ef2bc580f0a199209001a1bac63e0fec04938cd7cde1a5dd18f41498fe"
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/hashes/confirmed`

### Response

```json
{
  "status": "success",
  "data": {
    "0x50f7c8ef2bc580f0a199209001a1bac63e0fec04938cd7cde1a5dd18f41498fe": true
  }
}
```


# GetRecentActiveCurators

## API

<table><thead><tr><th width="170">API</th><th>/v2/{ecosystem}/recent/curators</th></tr></thead><tbody><tr><td>Title</td><td>GetRecentActiveCurators</td></tr><tr><td>Description</td><td>Retrieve the recent profiles that have received and accepted bids</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="148">Name</th><th width="97">Type</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/lens/recent/curators' \
  -H 'accept: application/json'
```

#### Request URL

`https://api.tako.so/v2/lens/recent/curators`

### Response

```json
{
  "status": "success",
  "data": [
    {
      "item": {
        "id": 40,
        "index": 0,
        "ignores": null,
        "platform_type": "",
        "content_uri": "",
        "bid_token": "",
        "bid_address": "",
        "bid_amount": "100000000000000",
        "bid_expires": 0,
        "to_profiles": null,
        "curator_profile_id": 34550,
        "curator_pub_id": "",
        "bid_type": "",
        "others": null,
        "events": null,
        "create_at": 0,
        "update_at": 1693559472
      },
      "profile": {
        "id": "0x86f6",
        "name": "sparks",
        "bio": "",
        "attributes": [
          {
            "displayType": null,
            "traitType": null,
            "key": "app",
            "value": "Lenster"
          }
        ],
        "followNftAddress": "0xDa9594313EA5e45cCE569DEb9C0845de463F83ad",
        "metadata": "https://arweave.net/9glSzgWC0uJYH8pAhKKSCZb70OP6vpL1cYSOCLTTiz4",
        "isDefault": false,
        "picture": {
          "__typename": "MediaSet",
          "original": {
            "mimeType": null,
            "url": "https://ik.imagekit.io/lens/media-snapshot/a2af6746a6b3db597ba37e29b198185f7cbb4a87aaabda0510a54e0bbbdd57e8.jpg"
          }
        },
        "handle": "sparks.test",
        "coverPicture": null,
        "ownedBy": "0x26994399D0b5298262959493FD8f903B40E7F65d",
        "dispatcher": {
          "address": "0x6C1e1bC39b13f9E0Af9424D76De899203F47755F"
        },
        "stats": {
          "totalFollowers": 1,
          "totalFollowing": 0,
          "totalPosts": 74,
          "totalComments": 21,
          "totalMirrors": 28,
          "totalPublications": 123,
          "totalCollects": 0
        },
        "followModule": null
      },
      "curator_info": {
        "last_bid_price": "100000000000000"
      }
    },
    {
      "item": {
        "id": 30,
        "index": 0,
        "ignores": null,
        "platform_type": "",
        "content_uri": "",
        "bid_token": "",
        "bid_address": "",
        "bid_amount": "1200000000000000",
        "bid_expires": 0,
        "to_profiles": null,
        "curator_profile_id": 36113,
        "curator_pub_id": "",
        "bid_type": "",
        "others": null,
        "events": null,
        "create_at": 0,
        "update_at": 1692948703
      },
      "profile": {
        "id": "0x8d11",
        "name": "",
        "bio": "",
        "attributes": [],
        "followNftAddress": null,
        "metadata": "",
        "isDefault": false,
        "picture": null,
        "handle": "curator1.test",
        "coverPicture": null,
        "ownedBy": "0x87A4798567135aD8fF1d380df18DBb63dD2771c8",
        "dispatcher": {
          "address": ""
        },
        "stats": {
          "totalFollowers": 0,
          "totalFollowing": 0,
          "totalPosts": 2,
          "totalComments": 0,
          "totalMirrors": 6,
          "totalPublications": 8,
          "totalCollects": 0
        },
        "followModule": null
      },
      "curator_info": {
        "last_bid_price": "1200000000000000"
      }
    },
    {
      "item": {
        "id": 12,
        "index": 0,
        "ignores": null,
        "platform_type": "",
        "content_uri": "",
        "bid_token": "",
        "bid_address": "",
        "bid_amount": "0",
        "bid_expires": 0,
        "to_profiles": null,
        "curator_profile_id": 35463,
        "curator_pub_id": "",
        "bid_type": "",
        "others": null,
        "events": null,
        "create_at": 0,
        "update_at": 1692869635
      },
      "profile": {
        "id": "0x8a87",
        "name": "Angela",
        "bio": "Aw",
        "attributes": [],
        "followNftAddress": "0xC0996FB9F5B1306A36400005E6DC06428B54F6ab",
        "metadata": "https://arweave.net/LDwPgZXtg1kXZYa8LnWsX1Z7d2yLqMnD-7s6iQVGL2c",
        "isDefault": false,
        "picture": {
          "__typename": "MediaSet",
          "original": {
            "mimeType": null,
            "url": "https://ik.imagekit.io/lens/media-snapshot/bc9da677d0e35af515d8d4b558ac75cd5786444ef355c624003441d1e01d8354.png"
          }
        },
        "handle": "angelaa.test",
        "coverPicture": null,
        "ownedBy": "0xB6110344798b08f2bBC3FF82d0BA094e38D50f7f",
        "dispatcher": {
          "address": ""
        },
        "stats": {
          "totalFollowers": 0,
          "totalFollowing": 0,
          "totalPosts": 3,
          "totalComments": 2,
          "totalMirrors": 1,
          "totalPublications": 6,
          "totalCollects": 1
        },
        "followModule": null
      },
      "curator_info": {
        "last_bid_price": "0"
      }
    },
    {
      "item": {
        "id": 4,
        "index": 0,
        "ignores": null,
        "platform_type": "",
        "content_uri": "",
        "bid_token": "",
        "bid_address": "",
        "bid_amount": "20000000000000000",
        "bid_expires": 0,
        "to_profiles": null,
        "curator_profile_id": 34370,
        "curator_pub_id": "",
        "bid_type": "",
        "others": null,
        "events": null,
        "create_at": 0,
        "update_at": 1692867175
      },
      "profile": {
        "id": "0x8642",
        "name": "",
        "bio": "",
        "attributes": [],
        "followNftAddress": "0x035E2b571d98Ef238fD8C12D263B6f1726317a0b",
        "metadata": "",
        "isDefault": false,
        "picture": null,
        "handle": "lenstest1111.test",
        "coverPicture": null,
        "ownedBy": "0x793eC059cCc2Ceeb8c6748111550b23c4e0072Bb",
        "dispatcher": {
          "address": "0x6C1e1bC39b13f9E0Af9424D76De899203F47755F"
        },
        "stats": {
          "totalFollowers": 1,
          "totalFollowing": 0,
          "totalPosts": 27,
          "totalComments": 9,
          "totalMirrors": 31,
          "totalPublications": 67,
          "totalCollects": 0
        },
        "followModule": null
      },
      "curator_info": {
        "last_bid_price": "20000000000000000"
      }
    }
  ]
}
```


# ActiveStatistics

## API

<table><thead><tr><th width="174">API</th><th>/v2/{ecosystem}/active_statistics</th></tr></thead><tbody><tr><td>Title</td><td>LensActiveStatistics</td></tr><tr><td>Description</td><td>Retrieve recent interaction data for certain profiles on Lens or Farcaster, such as the number of followers, the number of comments received, and so on. <br>Only comments, mirrors, replies, or any other interaction from others on the posts made by these profiles will be counted. Posts initiated by these profiles will not be counted.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<mark style="color:red;">At least one of the profileIds and fids needs to be provided.</mark>

<mark style="color:red;">Provide fids when ecosystem is farcaster, and provide profileIds when ecosystem is lens</mark>

<table><thead><tr><th width="146">Name</th><th width="104">Type</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td>ecosystem</td><td>string</td><td>YES</td><td>"lens" or "farcaster"</td></tr><tr><td>profileIds</td><td>uint[]</td><td>NO</td><td>The Lens profile id list of bidders or curators</td></tr><tr><td>fids</td><td>uint[]</td><td>NO</td><td>The Farcaster FID list of bidders or curators</td></tr><tr><td>interval</td><td>string</td><td>YES</td><td>“24h”, “3d”, “7d”, default to “24h”. <br>"24h" indicates 24 hours<br>"3d" indicates 3 days<br>"7d" indicates 7 days<br>Specify a time period and only analyze the activity data on Lens during that time.</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/active_statistics' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "profileIds": [
      36112
    ],
    "interval": "7d"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/active_statistics`

### Response

```json
{
  "status": "success",
  "data": {
    "data": {
      "36112": {
        "comment": 0,
        "follow": 0,
        "mirror": 5
      }
    }
  }
}
```


# GetLensCuratorAccepted

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/curator/accepted</th></tr></thead><tbody><tr><td>Title</td><td>GetLensCuratorAccepted</td></tr><tr><td>Description</td><td>Retrieve the last 10 completed bids</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>GET</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="113">Name</th><th width="82">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileId</td><td>string</td><td>NO</td><td>The Lens profile id of curator</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>cursor</td><td>int</td><td>NO</td><td>The id of bid. After calling this API, you will get the parameter next_cursor from the return value. When calling this API again, pass next_cursor as the value for the parameter cursor, which filters out data before the cursor and only queries data after the cursor.</td></tr></tbody></table>

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'GET' \
  'https://api.tako.so/v2/lens/curator/accepted?profileId=36113&cursor=0'
```

#### Request URL

`https://api.tako.so/v2/lens/curator/accepted`

### Response

```json
{
  "status": "success",
  "data": {
    "list": [
      {
        "id": 19587,
        "index": 0,
        "platform_type": "momoka",
        "content_uri": "",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": 1000000000000,
        "curator_profile_id": 36113,
        "curator_pub_id": "0x8d11-0x01-DA-2e031960",
        "state": "",
        "bid_type": "Mirror",
        "profile": {
          "id": "0x8d11",
          "name": "",
          "bio": "",
          "attributes": [],
          "followNftAddress": null,
          "metadata": "",
          "isDefault": false,
          "picture": null,
          "handle": "curator1.test",
          "coverPicture": null,
          "ownedBy": "0x87A4798567135aD8fF1d380df18DBb63dD2771c8",
          "dispatcher": {
            "address": "0x6C1e1bC39b13f9E0Af9424D76De899203F47755F"
          },
          "stats": {
            "totalFollowers": 0,
            "totalFollowing": 0,
            "totalPosts": 0,
            "totalComments": 0,
            "totalMirrors": 1,
            "totalPublications": 1,
            "totalCollects": 0
          },
          "followModule": null
        },
        "events": {
          "addBidMomokaEvent": {
            "state": "Pending",
            "tx_hash": "0xdc6a0bb00bac372f491f20221ac02ab15749045c0eae6a9a616ee9645105f9fc",
            "event_name": "addBidMomokaEvent",
            "block_number": 38579027,
            "block_timestamp": 1691030436
          },
          "modifiBidMomokaEventPass": {
            "state": "Pass",
            "tx_hash": "0x84036c1343faa17ab3d87cf0db72b7057355fededb54b1fc6136a31515592883",
            "event_name": "modifiBidMomokaEvent",
            "block_number": 38585588,
            "block_timestamp": 1691045429
          }
        },
        "create_at": 1691030436,
        "update_at": 1691045429
      }
    ],
    "has_more": false,
    "next_cursor": 0
  }
}
```


# GetLensBidsCreated

## API

<table><thead><tr><th width="162">API</th><th>/v2/lens/get_bids_created</th></tr></thead><tbody><tr><td>Title</td><td>GetLensBidsCreated</td></tr><tr><td>Description</td><td>Retrieve the bids created by the bidders on Lens.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="139">Name</th><th width="115">Type</th><th width="110">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>YES</td><td>The lens profile id list of the bidders</td></tr><tr><td>bidType</td><td>string[]</td><td>NO</td><td>"Post", "Mirror", "Comment", "QuotedPublication"<br>If the bidType is not included in the request parameters, all data will be queried.</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, offsett 5 means that the first 5 rows of the query result will be skipped.</td></tr><tr><td>sort</td><td>string</td><td>NO</td><td>Can sort by "bid_amount", "create_at", "update_at", default to "bid_amount"</td></tr><tr><td>sortType</td><td>string</td><td>NO</td><td>“desc” or “asc”, default to “desc”. Arrange in ascending or descending order.</td></tr><tr><td>state</td><td>string</td><td>NO</td><td>The state of bid. “Pending”, “Pass”, “Cancel”.<br>If the state is not included in the request parameters, all data will be queried.</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/get_bids_created' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "profileIds": [
      36112
    ],
    "bidType": [
      "Post", "Mirror"
    ],
    "limit": 5,
    "offset": 0,
    "sort": "create_at",
    "sortType": "desc",
    "state": "Pending"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/get_bids_created`

### Response

```json
{
  "status": "success",
  "data": {
    "bids": [
      {
        "id": 18729,
        "index": 70,
        "platform_type": "polygon",
        "content_uri": "",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": 1000000000000,
        "bid_expires": 1691012582,
        "to_profiles": [
          36113
        ],
        "curator_profile_id": 0,
        "curator_pub_id": "0x00",
        "state": "Pending",
        "bid_type": "Mirror",
        "block_number": 0,
        "others": {
          "pubIdPointed": 2,
          "profileIdPointed": 36112
        },
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xfef79bb3082eed54df52319cac60563bd7430d4c165f9927bcd362d33862e9f7",
            "event_name": "addBidEvent",
            "block_number": 38553832,
            "block_timestamp": 1690969382
          }
        },
        "create_at": 1690969382,
        "update_at": 1690969382,
        "is_ignored": false
      }
    ],
    "total": 1
  }
}
```


# GetLensBidsReceived

## API

<table><thead><tr><th width="157">API</th><th>/v2/lens/get_bids_received</th></tr></thead><tbody><tr><td>Title</td><td>GetLensBidsReceived</td></tr><tr><td>Description</td><td>Retrieve the content created on Lens sent to you by others.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="162">Name</th><th width="98">Type</th><th width="111">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>YES</td><td>The lens profile id list of the curators</td></tr><tr><td>bidType</td><td>string[]</td><td>NO</td><td>"Post", "Mirror", "Comment", "QuotedPublication"<br>If the bidType is not included in the request parameters, all data will be queried.</td></tr><tr><td>includeIgnore</td><td>bool</td><td>NO</td><td>Should ignored content be included. Default to true</td></tr><tr><td>limit</td><td>int</td><td>NO</td><td>The number of bids displayed per page, default to 10</td></tr><tr><td>offset</td><td>int</td><td>NO</td><td>Specify the number of rows to be skipped from the beginning of the query result. For example, OFFSET 5 means that the first 5 rows of the query result will be skipped.</td></tr><tr><td>sort</td><td>string</td><td>NO</td><td>Can sort by "bid_amount", "create_at", "update_at", default to "bid_amount"</td></tr><tr><td>sortType</td><td>string</td><td>NO</td><td>“desc” or “asc”, default to “desc”. Arrange in ascending or descending order.</td></tr><tr><td>state</td><td>string</td><td>NO</td><td>The state of bid. “Pending”, “Pass”, “Cancel”.<br>If the state is not included in the request parameters, all data will be queried.</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/get_bids_received' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "bidType": [
      "Post", "Mirror"
    ],
    "includeIgnore": true,
    "limit": 5,
    "offset": 0,
    "profileIds": [
      36113
    ],
    "sort": "create_at",
    "sortType": "desc",
    "state": "Pending"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/get_bids_received`

### Response

```json
{
  "status": "success",
  "data": {
    "count": 1,
    "data": [
      {
        "id": 18729,
        "index": 70,
        "ignores": [
          false
        ],
        "platform_type": "polygon",
        "content_uri": "",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": 1000000000000,
        "bid_expires": 1691012582,
        "to_profiles": [
          36113
        ],
        "curator_profile_id": 0,
        "curator_pub_id": "0x00",
        "state": "Pending",
        "bid_type": "Mirror",
        "others": {
          "pubIdPointed": 2,
          "profileIdPointed": 36112
        },
        "events": {
          "addBidEvent": {
            "state": "Pending",
            "tx_hash": "0xfef79bb3082eed54df52319cac60563bd7430d4c165f9927bcd362d33862e9f7",
            "event_name": "addBidEvent",
            "block_number": 38553832,
            "block_timestamp": 1690969382
          }
        },
        "create_at": 1690969382,
        "update_at": 1690969382
      }
    ],
    "ecosystem": "lens"
  }
}
```


# GetLensBidsConfirmingCreated

## API

<table><thead><tr><th width="162">API</th><th>/v2/lens/get_bids_confirming_created</th></tr></thead><tbody><tr><td>Title</td><td>GetLensBidsConfirmingCreated</td></tr><tr><td>Description</td><td>After bidders creating and submitting a bid to curator, it needs to be confirmed by the Polygon network. In order to ensure data security, a certain number of blocks will be waited for before considering the bid data to be accurate and correct. This interface is used to query confirming bids created by bidders.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<mark style="color:red;">At least one of addresses and profileIds needs to be filled.</mark>

<table><thead><tr><th width="129">Name</th><th width="91">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>addresses</td><td>string[]</td><td>NO</td><td>The EVM-compatible address list of the bidders</td></tr><tr><td>profileIds</td><td>int[]</td><td>NO</td><td>The lens profile id list of the bidders</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/get_bids_confirming_created' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "profileIds": [
      36112
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/get_bids_confirming_created`

### Response

```json
{
  "status": "success",
  "data": {
    "bids": [
      {
        "index": 70,
        "platform_type": "polygon",
        "content_uri": "",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": 1000000000000,
        "bid_expires": 1691012582,
        "to_profiles": [
          36113
        ],
        "curator_profile_id": 0,
        "curator_pub_id": "0x00",
        "state": "Pending",
        "bid_type": "Mirror",
        "block_number": 38553832,
        "others": {
          "profileIdPointed": 36112,
          "pubIdPointed": 2
        },
        "events": {
          "addBidEvent": {
            "block_number": 38553832,
            "block_timestamp": 1690969382,
            "event_name": "addBidEvent",
            "state": "Pending",
            "tx_hash": "0xfef79bb3082eed54df52319cac60563bd7430d4c165f9927bcd362d33862e9f7"
          }
        },
        "create_at": 1690969382,
        "update_at": 1690969382,
        "is_ignored": false
      }
    ],
    "total": 1
  }
}
```


# GetLensBidsConfirmingReceived

## API

<table><thead><tr><th width="162">API</th><th>/v2/lens/get_bids_confirming_received</th></tr></thead><tbody><tr><td>Title</td><td>GetLensBidsConfirmingReceived</td></tr><tr><td>Description</td><td>After bidders creating and submitting a bid to curator, it needs to be confirmed by the Polygon network. In order to ensure data security, a certain number of blocks will be waited for before considering the bid data to be accurate and correct. This interface is used to query confirming bids received by curators.</td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="129">Name</th><th width="91">Type</th><th width="101">Required</th><th>Description</th></tr></thead><tbody><tr><td>profileIds</td><td>int[]</td><td>NO</td><td>The lens profile id list of the bidders</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/get_bids_confirming_received' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "profileIds": [
      36113
    ]
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/get_bids_confirming_received`

### Response

```json
{
  "status": "success",
  "data": {
    "bids": [
      {
        "index": 70,
        "platform_type": "polygon",
        "content_uri": "",
        "bid_token": "0x0000000000000000000000000000000000000000",
        "bid_address": "0xCe41cdCCA1849CaD58DaACc6005B1990Be04e1F0",
        "bid_amount": 1000000000000,
        "bid_expires": 1691012582,
        "to_profiles": [
          36113
        ],
        "curator_profile_id": 0,
        "curator_pub_id": "0x00",
        "state": "Pending",
        "bid_type": "Mirror",
        "block_number": 38553832,
        "others": {
          "profileIdPointed": 36112,
          "pubIdPointed": 2
        },
        "events": {
          "addBidEvent": {
            "block_number": 38553832,
            "block_timestamp": 1690969382,
            "event_name": "addBidEvent",
            "state": "Pending",
            "tx_hash": "0xfef79bb3082eed54df52319cac60563bd7430d4c165f9927bcd362d33862e9f7"
          }
        },
        "create_at": 1690969382,
        "update_at": 1690969382,
        "is_ignored": false
      }
    ],
    "total": 1
  }
}
```


# VerifyLensBid

## API

<table><thead><tr><th width="160">API</th><th>/v2/lens/verify_bid</th></tr></thead><tbody><tr><td>Title</td><td>VerifyLensBid</td></tr><tr><td>Description</td><td><p>Momoka is now running for Lens. The user’s publications are possibly sent to the Momoka system or Polygon (the old mechanism). So part of the publications are from the Momoka, and the others are from the Polygon. </p><p></p><p>The data on Momoka and Polygon is separate. So the users cannot comment or mirror using Polygon for the Momoka publications. </p><p></p><p>Suppose the booster wants the curator to comment on or mirror a Momoka publication. The comment or mirror result will be sent to Momoka after the curator accepts the bid. Because Lens does not allow users to comment or mirror Momoka publications using Polygon. </p><p></p><p>Tako will do all the curate works for curators, such as comment, mirror, etc. It will be straightforward if Tako does all the work using Polygon because they all happen in Polygon. But if Tako has to use Momoka, it won’t be easy because Momoka and Polygon are separate. </p><p></p><p>So it would be best to do extra work to verify whether the curate works are done. The curator can claim his reward from the booster bid after verification.</p></td></tr><tr><td>Authorization</td><td>Not required</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="168">Name</th><th width="111">Type</th><th width="121">Required</th><th>Description</th></tr></thead><tbody><tr><td>address</td><td>string</td><td>YES</td><td>The curator’s EVM-compatible address</td></tr><tr><td>index</td><td>int</td><td>NO</td><td>The index of bid</td></tr><tr><td>pubId</td><td>string</td><td>YES</td><td>The id of publication created by the curator</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/verify_bid' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
    "address": "0x87A4798567135aD8fF1d380df18DBb63dD2771c8",
    "index": 36,
    "pubId": "0x8d11-0x07-DA-912405d7"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/verify_bid`

### Response

<mark style="color:red;">When calling the</mark> `loanWithSig` <mark style="color:red;">method in the contract, you need to pass the</mark> `signature` <mark style="color:red;">and</mark> `relayer` <mark style="color:red;">from the response as parameters to</mark> `loanWithSig`<mark style="color:red;">. Please refer to the contract method for specific details.</mark>

<mark style="color:red;">The</mark> `loanWithSig` <mark style="color:red;">method in the contract is used to allow a curator to claim their reward when their curation is evaluated as the best after the curation is completed.</mark>

```json
{
  "status": "success",
  "data": {
    "chainId": 80001,
    "contract": "0x30daf74D17781f0C2aB19db687F14E3293B17E7e",
    "relayer": "0x197309df1f580884B5A2A75DFd842a524Fd8AC15",
    "signature": {
      "r": "0x7417cc59f0ccfba0243c0c5640bd31a812e2f4988097027af8253abf8628c4f4",
      "s": "0x61988da0222e4b8ccc5c8cb1d85620b44bac6b71f1ba2609dd6c9315468ad788",
      "v": 27,
      "deadline": 1697558403
    }
  }
}
```


# IgnoreLensBid

## API

<table><thead><tr><th width="161">API</th><th>/v2/lens/ignore_bid</th></tr></thead><tbody><tr><td>Title</td><td>IgnoreLensBid</td></tr><tr><td>Description</td><td>The curator can ignore some bids, which will not remove the bid data, just hidden.</td></tr><tr><td>Authorization</td><td>Required. Put a key-value pair in the request body, the key is Authorization, and the value is "Bearer {token}", Use the API GetToken to acquire the token. Please read the example below for more detail.</td></tr><tr><td>Method</td><td><code>POST</code></td></tr></tbody></table>

## Request Parameters

<table><thead><tr><th width="150">Name</th><th width="88">Type</th><th width="106">Required</th><th>Description</th></tr></thead><tbody><tr><td>index</td><td>int</td><td>YES</td><td>The index of bid</td></tr><tr><td>platformType</td><td>string</td><td>YES</td><td>"momoka" or "polygon". The mention of "momoka" indicate that the content will be curated on Momoka, while the mention of "polygon" indicate that the content will be curated on Polygon</td></tr><tr><td>profileIds</td><td>int[]</td><td>NO</td><td>The Lens profile id list of the curators</td></tr><tr><td>ignore</td><td>bool</td><td>NO</td><td>True indicate ignore</td></tr></tbody></table>

## Parameter Content Type

application/json

## Request and Response Example

### Request

#### cURL Code

```bash
curl -X 'POST' \
  'https://api.tako.so/v2/lens/ignore_bid' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhZGRyZXNzIjoiMHg4N0E0Nzk4NTY3MTM1YUQ4ZkYxZDM4MGRmMThEQmI2M2REMjc3MWM4IiwidHlwZSI6InRva2VuIiwiZXhwIjoxNjkwOTc3MTA2fQ.oUIK9CLarLGRGlff08YufSiQxkZ3D-hhWREfhbVgEYE' \
  -d '{
    "ignore": true,
    "index": 70,
    "platformType": "polygon"
  }'
```

#### Request URL

`https://api.tako.so/v2/lens/ignore_bid`

### Response

```json
{
  "status":"success",
  "data":"update ignore info of 70 to true succeed"
}
```




---

[Next Page](/llms-full.txt/1)

