---
# System prepended metadata

title: Adnovation

---

# Adnovation

`Token 8badc47d58474cf89ba3f62c8bbd2f5fd4bb9370`

***(GET)*** http://18.117.109.79:8000/addplayer/?slug=cristiano-ronaldo-dos-santos-aveiro&freq=1 (For adding new players with freq denoting data collection every n hour)

***(GET)*** http://18.117.109.79:8000/players/ (For getting all players) (Additional params `"name"` to check on basis of player name, `club`, `position`, `league`)

***(GET)*** http://18.117.109.79:8000/dropdown/ To get dropdown values for club, position, league

***(GET)*** http://18.117.109.79:8000/cards/ (For getting all cards) (Additioal params `"id"` i.e. card id and/or `"rarity"` i.e rare, super_rare or unique)

***(GET)*** http://18.117.109.79:8000/history/<pk>/ (For gettting data price history of a card where pk is primary key for card)

***(GET)*** `http://18.117.109.79:8000/filter/?transfer_type=single_sale_offer&rarity=super_rare&avg=10&lwst=5&high=10&no_zero=true&condition=[[ 'p1', 1, 0.1, 'p2', 0.1, 0.2, '<' , 'sum', '-'], ['p2', 1, 0,  0, 0.1, 0.2, '<',  'sum', 'sum']]&id=1&season=all&wtp='p1', 1, 0.1, 'p1', 0.1, 0.2, '-', 'sum'&date_from=2020-05-18&date_to=2020-05-18` (For screener and filter here rarity can be 'rare', 'super_rare', 'unique' and transfer_type can be 'all', 'single_sale_offer' or 'auction', 'id' is player database id, 'season' can be 'all', '2020-21' etc..)
In above equation the conditions will have 9 elements which includes the operator to compare with WTP and wtp will have 8 elements which excludes condition operator.
transfer_type = {'all', 'auction', 'offer', 'bundled_auction', 'reward', 'direct_offer', 'transfer', 'referral', 'single_sale_offer', 'single_buy_offer'}
season = {'2019-20', '2020-21', 'all'}
position = {'all'}


***(GET)***  `http://18.117.109.79:8000/screencards/?id=1&rarity=rare&season=all&serial_low=10&serial_high=20&offer=yes` For getting screener cards

***(GET)*** `http://18.117.109.79:8000/statechange/?id=[1,2,3,4]&state=true`
'id' are player ids and 'state' will be 'true/false' for 'on/off'

***(GET)*** http://18.117.109.79:8000/instantaddplayer/?slug=cristiano-ronaldo-dos-santos-aveiro&freq=1 (For adding new players with freq denoting data collection every n hour)

***(POST)*** http://18.117.109.79:8000/login/ Body - {"username":"superuser", "password":"shikhar@10"}

***(GET)*** http://18.117.109.79:8000/manual/?id=[1,2,3] 'id' are player database id (for manual data collection of a player)

***(GET)*** http://18.117.109.79:8000/process/?n=2 Geting proccess log
where 'n' is the page number

***(GET)*** http://18.117.109.79:8000/createrules/?rarity=rare&transfer_type=[single_sale_offer, single_buy_offer]&wtp='P1', 1, 0.1, 'P1', 0.1, 0.2, '-', 'sum'&p1=5&p2=10&p3=5&condition=[[ 'p1', 1, 0.1, 'p2', 0.1, 0.2, '<' , 'sum', '-'], ['p2', 1, 0,  0, 0.1, 0.2, '<',  'sum', 'sum']]&name=rule1&v1=1&v2=1&v3=1&season=2020-21&days=7
For adding a new rule

***(GET)*** http://18.117.109.79:8000/rules/
For showing all the rules

***(GET)*** http://18.117.109.79:8000/rule/?rule_id=1&rarity=rare&transfer_type=[single_sale_offer, single_buy_offer]&wtp='P1', 1, 0.1, 'P1', 0.1, 0.2, '-', 'sum'&p1=5&p2=10&p3=5&condition=[[ 'p1', 1, 0.1, 'p2', 0.1, 0.2, '<' , 'sum', '-'], ['p2', 1, 0,  0, 0.1, 0.2, '<',  'sum', 'sum']]&name=rule1&v1=1&v2=1&v3=1&season=2020-21&days=7

For editing a rule using id, rule_id will be rule pk.

***(Delete)*** http://18.117.109.79:8000/rule/?rule_id=1
for deleting rule


***(GET)*** http://18.117.109.79:8000/addgrabplayer/?id=[1]&rule=2
this is for adding player and rule together, id is player id and rule will be rule id

***(GET)***  http://18.117.109.79:8000/pricegrab/ Get all the pricegrab entries
params are `club`, `position`, `league` and `player`(players api id)


***(GET)*** http://18.117.109.79:8000/pricestatechange/?id=[1]&state=false
for changing player price grab state change where id is pricegrab entry ids

***(GET)*** http://18.117.109.79:8000/screensave/?save_type=card&rarity=rare&transfer_type=[single_sale_offer, single_buy_offer]&wtp='P1', 1, 0.1, 'P1', 0.1, 0.2, '-', 'sum'&avg=5&high=10&lwst=5&screen_name=somethingnew&condition=[[ 'p1', 1, 0.1, 'p2', 0.1, 0.2, '<' , 'sum', '-'], ['p2', 1, 0,  0, 0.1, 0.2, '<',  'sum', 'sum']]&v1=1&v2=1&v3=1&season=2020-21&no_zero=true&id=1&date_from=2020-05-18&date_to=2020-05-18
Add a new Preset to the database, 'save_type' can be 'card' or 'screener'

***(GET)*** http://18.117.109.79:8000/preset/?screen_name=somethingnew&save_type='card' Get preset details

***(Delete)*** http://18.117.109.79:8000/preset/?screen_name=somethingnew&save_type='card' Delete preset

***(GET)*** http://18.117.109.79:8000/usercards/?rarity=rare&season=2020-21&player=Nick&position=goal&club=some&league=something
Show user card, needs user slug


***(GET)*** http://18.117.109.79:8000/addip/?ip=ipadressport
add ip address with port

***(GET)*** http://18.117.109.79:8000/pricetable/?id=1&transfer_type=['all']&rarity=rare&season=2020-21
API for price table 


***(GET)*** http://18.117.109.79:8000/settings/slug=something
save slug

***(PUT)*** http://18.117.109.79:8000/settings/slug=something2
update slug

***(DELETE)*** http://18.117.109.79:8000/settings/
delete slug

***(GET)*** http://18.117.109.79:8000/slugs/
to get all slugs

ws://18.117.109.79:8000/ws/app/

***(GET)*** http://18.117.109.79:8000/priceplayer/?price_id=1&new_rule=1
To change a pricegrab player rule

***(Delete)*** http://18.117.109.79:8000/priceplayer/?price_id=[1]
TO remove a pricegrab player rule

***(POST)*** http://18.117.109.79:8000/offers/

***(POST)*** http://18.117.109.79:8000/userdetails/
email - user email and password - user password

***(GET)*** http://18.117.109.79:8000/frequency/?id=[1,2,3,4]&freq=12
for changing frequency
id are player ids and freq is new frequency

***(POST)*** http://18.117.109.79:8000/privatekey/
private_key, infura_url

***(DELETE)*** http://18.117.109.79:8000/privatekey/
delete private key details

***(GET)*** http://18.117.109.79:8000/buyoffer/?sendamount=4&slug=['cristiano-ronaldo-dos-santos-aveiro-2019-rare-6']
To create a single buy offer

***(GET)*** http://18.117.109.79:8000/getbundles/
To get all live bundles

***(GET)*** http://18.117.109.79:8000/savebundles/?slugs=[bundleslug1, bundleslug2]

***(POST)*** http://18.117.109.79:8000/savebundlecalculations/
name - calculationname, conditions - wtpequation[P1, V1, P1, V2, sum/-], v1, v2, p1-10(some number for calculating average), super-supermultiplier, unique-uniquemultiplier

***(GET)*** http://18.117.109.79:8000/savebundlecalculations/?id=1
for 1 calculation data or no id for all

***(GET)*** http://18.117.109.79:8000/connectbundle/?id=calculation_id&bundles=[bundles_id]

***(GET)*** http://18.117.109.79:8000/bundlecardsdata/slug=bundle_slug
get cards data for the bundle

***(GET)*** http://18.117.109.79:8000/bundles/?time_filter=completed Get saved bundles with data param is time_filter which can be "completed"/"ongoing"

***(GET)*** http://18.117.109.79:8000/nodatabundle/ Get saved bundle without data.

***(GET)*** http://18.117.109.79:8000/createcamps/?name=camp_name&player=player_id&&wtp=['P1', 1, 0.1, 'P1', 0.1, 0.2, '-', 'sum']&frequency=12&state=True
For creating campaigns

***(GET)*** http://18.117.109.79:8000/seecamps/
For seeing all the campaigns

***(DELETE)*** http://18.117.109.79:8000/seecamps/?camp=[1,2,3]
For deleting campaigns

***(GET)*** http://18.117.109.79:8000/campstate/?camp=[1,2,3]&state=true/false
For changing campaign state

***(GET)*** http://18.117.109.79:8000/createbatchs/?slugs=[card_slugs]&batch=batch_number_for_card&camp=1
For aading cards to batches

***(DELETE)*** http://18.117.109.79:8000/createbatchs/?slugs=[card_slugs]&camp=1
For deleting cards from batches

***(GET)*** http://18.117.109.79:8000/createcampcalculation/?rarity=rare&transfer_type=[single_sale_offer, single_buy_offer]&p1=5&p2=10&p3=5&name=calcu1&v1=1&v2=1&v3=1&season=2020-21&days=7
For creaing calculation for camp

***(GET)*** http://18.117.109.79:8000/campcalculation/
For getting all the calculations with ids

***(GET)*** http://18.117.109.79:8000/editcampcalculation/?rarity=rare&transfer_type=[single_sale_offer, single_buy_offer]&p1=5&p2=10&p3=5&name=calcu1&v1=1&v2=1&v3=1&season=2020-21&days=7&calculation_id=1
For editing calculation for camp

***(GET)*** http://18.117.109.79:8000/connectcamp/?camp_id=1&calculation_id=1
For connecting calculation and campaign

***(DELETE)*** http://18.117.109.79:8000/editcampcalculation/?calculation_id=1
For deleting a calculation from the campaign

***(GET)*** http://18.117.109.79:8000/canceloffer/?blockchain=[12323,21323]
For canceling offer using blockchain ids

***(GET)*** http://18.117.109.79:8000/userdetails/
Get user email 

https://www.sitepoint.com/premium/books/django-channels-for-real-time-updates/read/1




{'transfer_time': datetime.datetime(2021, 5, 20, 17, 30, 43, tzinfo=<UTC>), 'transfertype': 'single_sale_offer', 'id': 2324}, {'transfer_time': datetime.datetime(2021, 5, 21, 4, 44, 33, tzinfo=<UTC>), 'transfertype': 'single_sale_offer', 'id': 2330}


can give all the bundle that are live and then select the bundle slug and save only the bundle slugs in the seprate api call.

model for saving wtp equation

updating wtp and lastprice in bundles.


https://stackoverflow.com/questions/52508038/how-to-increase-aws-ebs-nvme-size


player=player.values_list('id', flat=True)
all_player = PriceGrabPlayer.objects.values_list('name', flat=True)
new_players = Player.objects.filter(id__in=player.difference(all_player))

for pla in new_players:
PriceGrabPlayer.objects.create(name=pla)


adam lund
agustin almendra
agustin obando
agustin sanxhez

http://18.117.109.79:8000/statechange/?id=[%2224%22,%2242%22,%2256%22,%22120%22,%22149%22,%22180%22,%22190%22,%22224%22,%22284%22,%22329%22,%22336%22,%22368%22,%22931%22,%221229%22,%221234%22,%221239%22,%221245%22,%221270%22,%221277%22,%221320%22,%221327%22,%221329%22,%221330%22,%221333%22,%221376%22]&state=false


<QuerySet [<Player: Player object (288)>, <Player: Player object (296)>, <Player: Player object (274)>]>


58 17 * * * kill -1 `ps aux | grep -v 'grep' |grep -i run_huey | cut -d ' ' -f 4`
