API Developer's Manual

Projects

Get all projects using link https://apibeta.wings.ai/api/projects?limit=100&offset=0&order=-id

Max. Limit: 100

Python code example

projects = requests.get('https://apibeta.wings.ai/api/projects?limit=10&offset=0&order=-id').json()
                            

Project Logo

Get project logo using link https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/logo

{PROJECT_ADDRESS} specified in a results of prev. request.

Python code example

project_logo =requests.get('https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/logo').json()
                            

Project Terms

Get project terms using link https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/terms

Python code example

project_terms =requests.get('https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/terms').json()
                            

Project Forecasting Chart

Get chart of forecasts using link https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/forecasting/chart

Python code example

chart_data =requests.get('https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/forecasting/chart').json()
                            

Project Gallery

Get project video and images using link https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/gallery

Python code example

media =requests.get('https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/gallery').json()
                            

Get image or video using hash https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/gallery/{hash}

{Hash} specified in a results of prev. request.

Python code example

media =requests.get('https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/gallery/{hash}').json()
                            

Currencies

Get available currency list using link https://apibeta.wings.ai/api/currencies

Python code example

forecasts =requests.get('https://apibeta.wings.ai/api/currencies').json()
                            

Forecasts

Get all users forecasts using link https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/forecasting/forecasts?limit=10&offset=0&order=-created

{PROJECT_ADDRESS} you can get using request above.

Max. Limit: 10

Python code example

forecasts = requests.get('https://apibeta.wings.ai/api/projects/{PROJECT_ADDRESS}/forecasting/forecasts?limit=10&offset=0&order=-created').json()
                            

User Forecasts

Get user forecasts using link https://apibeta.wings.ai/api/users/{USER_ETH_ADDRESS}/forecasting/forecasts?limit=10&offset=0&order=-updated

{USER_ETH_ADDRESS} you can get in your profile on the https://www.wings.ai/

Max. Limit: 10

Python code example

user_forecasts = requests.get('https://apibeta.wings.ai/api/users/{USER_ETH_ADDRESS}/forecasting/forecasts?limit=10&offset=0&order=-updated').json()
                            

Categories

Get projects categories using link https://apibeta.wings.ai/api/dictionary/categories

Python code example

categories =requests.get('https://apibeta.wings.ai/api/dictionary/categories').json()
                            

Latest Block

Get latest block height and timestamp using link https://apibeta.wings.ai/api/blocks/latest

Python code example

latest_block =requests.get('https://apibeta.wings.ai/api/blocks/latest').json()
                            

Get FR

Contract address: 0x94B2F026A75BE2556C78A6D1f573bD79Fdfb1962

Python code example

contract = w3.eth.contract(abi=abi, address=contract_address)
                            

Python code example to create filter

event_filter = contract.events.ACCOUNT_ADDED.createFilter(
argument_filters={'filter': {"address": contract_address}})
entries = event_filter.get_all_entries()
fr = contract.functions.getFR(entries[0]['args']['account']).call()
                            

Abi


{
    "abi": [
        {
            "constant": true,
            "inputs": [],
            "name": "allowMigrations",
            "outputs": [
                {
                    "name": "",
                    "type": "bool"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "D2",
            "outputs": [
                {
                    "name": "",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "D3",
            "outputs": [
                {
                    "name": "",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "totalLocked",
            "outputs": [
                {
                    "name": "",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [
                {
                    "name": "",
                    "type": "address"
                }
            ],
            "name": "accounts",
            "outputs": [
                {
                    "name": "wingsBalance",
                    "type": "uint256"
                },
                {
                    "name": "wingsLocked",
                    "type": "uint256"
                },
                {
                    "name": "nActiveProjects",
                    "type": "uint64"
                },
                {
                    "name": "FR",
                    "type": "uint64"
                },
                {
                    "name": "lastOpenTimestamp",
                    "type": "uint64"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "semanticVersion",
            "outputs": [
                {
                    "name": "",
                    "type": "string"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "owner",
            "outputs": [
                {
                    "name": "",
                    "type": "address"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "D1",
            "outputs": [
                {
                    "name": "",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "totalReserved",
            "outputs": [
                {
                    "name": "",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "totalFR",
            "outputs": [
                {
                    "name": "",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "newOwner",
                    "type": "address"
                }
            ],
            "name": "transferOwnership",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [],
            "name": "token",
            "outputs": [
                {
                    "name": "",
                    "type": "address"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "inputs": [
                {
                    "name": "_token",
                    "type": "address"
                },
                {
                    "name": "_owner",
                    "type": "address"
                }
            ],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "constructor"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "account",
                    "type": "address"
                }
            ],
            "name": "ACCOUNT_ADDED",
            "type": "event"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "account",
                    "type": "address"
                },
                {
                    "indexed": false,
                    "name": "amount",
                    "type": "uint256"
                },
                {
                    "indexed": false,
                    "name": "totalReserved",
                    "type": "uint256"
                }
            ],
            "name": "WINGS_RESERVED",
            "type": "event"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "account",
                    "type": "address"
                },
                {
                    "indexed": false,
                    "name": "forecastingContract",
                    "type": "address"
                }
            ],
            "name": "PROJECT_ADDED",
            "type": "event"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "account",
                    "type": "address"
                },
                {
                    "indexed": false,
                    "name": "forecastingContract",
                    "type": "address"
                }
            ],
            "name": "PROJECT_OPENED",
            "type": "event"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "account",
                    "type": "address"
                },
                {
                    "indexed": false,
                    "name": "from",
                    "type": "address"
                },
                {
                    "indexed": false,
                    "name": "dFR",
                    "type": "int32"
                },
                {
                    "indexed": false,
                    "name": "newFR",
                    "type": "uint64"
                }
            ],
            "name": "PROJECT_CLOSED",
            "type": "event"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "account",
                    "type": "address"
                },
                {
                    "indexed": false,
                    "name": "amount",
                    "type": "uint256"
                }
            ],
            "name": "WINGS_RELEASED",
            "type": "event"
        },
        {
            "anonymous": false,
            "inputs": [
                {
                    "indexed": true,
                    "name": "previousOwner",
                    "type": "address"
                },
                {
                    "indexed": true,
                    "name": "newOwner",
                    "type": "address"
                }
            ],
            "name": "OwnershipTransferred",
            "type": "event"
        },
        {
            "constant": false,
            "inputs": [],
            "name": "lockMigrations",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_D1",
                    "type": "uint256"
                },
                {
                    "name": "_D2",
                    "type": "uint256"
                },
                {
                    "name": "_D3",
                    "type": "uint256"
                }
            ],
            "name": "setupDecayParams",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                },
                {
                    "name": "_dFR",
                    "type": "int32"
                }
            ],
            "name": "migrateFR",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_amount",
                    "type": "uint256"
                }
            ],
            "name": "reserveWings",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                },
                {
                    "name": "_forecastingContract",
                    "type": "address"
                }
            ],
            "name": "addProject",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                },
                {
                    "name": "_amount",
                    "type": "uint256"
                }
            ],
            "name": "openProject",
            "outputs": [
                {
                    "name": "FR",
                    "type": "uint64"
                },
                {
                    "name": "locked",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                },
                {
                    "name": "_amount",
                    "type": "uint256"
                }
            ],
            "name": "lockWings",
            "outputs": [
                {
                    "name": "wingsLocked",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                },
                {
                    "name": "_dFR",
                    "type": "int32"
                },
                {
                    "name": "_cancelProject",
                    "type": "bool"
                }
            ],
            "name": "closeProject",
            "outputs": [],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": false,
            "inputs": [
                {
                    "name": "_maxAmount",
                    "type": "uint256"
                }
            ],
            "name": "releaseWings",
            "outputs": [
                {
                    "name": "released",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "nonpayable",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                }
            ],
            "name": "getFR",
            "outputs": [
                {
                    "name": "FR",
                    "type": "uint64"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                }
            ],
            "name": "getWingsBalance",
            "outputs": [
                {
                    "name": "balance",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        },
        {
            "constant": true,
            "inputs": [
                {
                    "name": "_account",
                    "type": "address"
                }
            ],
            "name": "getLockedWings",
            "outputs": [
                {
                    "name": "locked",
                    "type": "uint256"
                }
            ],
            "payable": false,
            "stateMutability": "view",
            "type": "function"
        }
    ]
}