Real-time interactions in oTree using Django Channels: Auctions and real effort tasks
oTree, a popular platform for conducting behavioral experiments, exchanges data only as a participant exits or enters a web page. In many situations, however, information needs to be gathered and delivered instantaneously. This paper demonstrates a way to add real-time interactions to oTree and presents two ready-made apps: a double auction and a gift exchange with a real effort task. Many auction designs, including the double auction, use time constraints and carry out sales as soon as an ask and a bid are compatible. Instantaneous flow of information is thus a core requirement for programming these auctions in the first place. The real effort task measuring the number of correct answers within a time limit, on the other hand, benefits from the extra flexibility and security that Django Channels provides. Furthermore, real effort tasks are a simple starting point for building real-time interaction apps with oTree.