Only backing bets are matched immediately - all lay bets are delayed, and take typically up to 15 seconds to match.
If you can send me some details of what type of sports (e.g. horse racing, tennis, football) you want to place bets on, I may be able to offer some of my existing code to help you