Get Farm Address and Full Details
In order to participate in the farm and make a deposit, withdrawal, or any other functions, first we need to get the farm address by calling the TokensFarm API
Last updated
Was this helpful?
In order to participate in the farm and make a deposit, withdrawal, or any other functions, first we need to get the farm address by calling the TokensFarm API
Last updated
Was this helpful?
A farm's address will be included in the full farm details. In order to participate in a farm, you must first get the "full details" object, which will contain the farm's address. The address will allow you to interact with the contract.
GET
https://api.tokensfarm.com/farm/list?token=<token_symbol>&full=true
will response object with full details on the farm. "TokensFarm" parameter on response will contain the address of the farm
active
boolean
get only active/ended farms
sort
String
sort=apy -order by apy
sort=newest - order by date
sort=days_left - order by days left
page
Integer
get data by page number
farm_type
String
farm_type=LP,STAKING will return all the lp and staking farms
token
String
the symbol of the specific token for example: token=PORTX
page_size
Integer
the amount of farm objects in a page
full
boolean
if "true" will return a larger farm object with more data
view
String
example: tile
response example:
GET
https://api.tokensfarm.com/farm/config?symbol=HORD&type=LP&nonce=2
must be filtered by symbol, type and nonce
symbol
String
the symbol of the specific token for example: token=PORTX
type
String
farm_type=LP,STAKING will return all the lp and staking farms
nonce
Integer
nonce will be a count of the amount of time farms made for this token.
you can find a farm nonce with "Get farms list" API
response example: