LogoLogo
FeedsIntelligenceEngagementsHelpHome
TRADE360 Integration
TRADE360 Integration
  • Integration Guide
  • RMQ connection
    • Connection and Consumption setup
    • Message Deserializing
    • Market/Bet Message Handling
    • How do I work with TRADE360 feed?
  • Message Structure
    • Message Types Overview
    • Message
    • Events
    • Fixture
    • Competition
    • Markets
    • Bets
    • Participant
    • Livescore
    • Settlements
    • Heartbeat
    • Keep Alive
    • Extra Data
    • Outright Fixture
    • Outright Fixture Market
    • Outright League Fixture
    • Outright League Market
    • Outright Settlements
    • Outright League Settlement
    • Example Messages
    • ProviderMarkets
  • APIs
    • Metadata
    • Subscription
    • Distribution
    • Snapshot
    • Notes and Troubleshooting
  • Enumerations
    • Fixture/Scoreboard Status
    • Subscription
    • Message Types
    • Bet Suspension Reasons
    • Fixture Extra Data
    • Status Description
    • Statistics and Incidents
    • Periods
    • Bet Settlements and Statuses
    • Livescore Extra Data
    • Languages
  • SDK
    • SDK Overview
    • Configuration
    • SDK Installation Guide NodeJS
    • SDK Installation Guide .NET
    • SDK Installation Guide Java
  • Code Samples
    • RMQ Consumer (PHP)
    • RMQ Consumer (GO)
    • RMQ Consumer (Node.js)
    • RMQ Consumer (Python)
    • RMQ Consumer (JavaScript)
    • RMQ Consumer (C#)
Powered by GitBook
On this page

Was this helpful?

  1. Code Samples

RMQ Consumer (Python)

PreviousRMQ Consumer (Node.js)NextRMQ Consumer (JavaScript)

Last updated 4 months ago

Was this helpful?

Make sure to adjust the following fields as described on documentation : * <UserName> = username * <Password> = password * <HostName> = OS - InPlay: / PreMatch: STM - InPlay: / PreMatch: * <VirtualHost> = OS = VirtualHost = "Customers" STM = VirtualHost = "StmPreMatch" / VirtualHost = "StmInPlay" * <PackageID> = should be a number between “_“ for example _100_

import pika

connection = pika.BlockingConnection(
    pika.ConnectionParameters(
        host='HostName',
        port=5672,
        virtual_host='VHost',
        credentials=pika.PlainCredentials('<UserName>', '<Password>')
    )
)
channel = connection.channel()

def callback(ch, method, properties, body):
    print("Received message: %r" % body)

channel.basic_consume(queue='_<package_id>_', on_message_callback=callback, auto_ack=True)

print("Waiting for messages...")
channel.start_consuming()
inplay-rmq.lsports.eu
prematch-rmq.lsports.eu
stm-inplay.lsports.eu
stm-prematch.lsports.eu