EXCLUSIVE

6:54 PM PT -- Legal docs -- obtained by TMZ -- detail some of the charges Tekashi has been indicted on and why prosecutors want the judge to deny him bail. Prosecutors say in April, Tekashi waited in a car outside an NYC office building and recorded while his manager and other associates robbed some of Tekashi's rivals.

The incident where shots were fired at Barclays Center is also detailed ... and describes earlier in the night, Tekashi was present while someone from his crew fired multiple shots at another vehicle. Finally, the docs describe an incident in July where Tekashi allegedly ordered a hit on a rival ... a move that left one person shot in the foot.

There's also a photo of the gun recovered at Tekashi's Brooklyn home back in September by the feds, an AR-15 style rifle.

Tekashi will be back in court Tuesday to ask a judge for bail.

5:45 PM PT -- A courtroom sketch of Tekashi's arraignment has been released, and it looks like he was wearing his rainbow hair in pigtails and rocking a yellow outfit. We'll say this ... the artist definitely captured Tekashi's look better than that Tom Brady drawing did a few years back. Not quite as good as Paul Manafort﻿'s, though.

How does Paul Manafort get a better courtroom sketch than Tom Brady pic.twitter.com/2iSyOWxZql @jbillinson

4:49 PM PT -- Tekashi has been denied bail for now and will remain in custody pending trial. His attorney, Lance Lazzaro, proposed Tekashi be released if he paid the court $750k, surrendered his passport and remain on house arrest, suggesting that he wouldn't be a flight risk under those terms. Lazzaro's request was shot down ... but he plans to file an appeal with the judge during a bail hearing Tuesday.

Tekashi appeared calm in court, even though his hands and feet were shackled. His family, including his mother, was present during the arraignment.

3:30 PM PT -- According to the 17-page indictment, obtained by TMZ, Tekashi is facing 6 counts ... the most serious of which is discharging a firearm while committing a crime. That count carries a possible life sentence, and a mandatory minimum of 25 years in prison.

His ex-manager, Shottie, is facing the same 6 counts.

Prosecutors say the acts of violence were intended to protect the gang's drug biz, retaliate against rival gangs or promote Nine Trey's rep on the streets.

2:55 PM PT -- Tekashi and his crew conspired to commit a slew of crimes, including drug deals, armed robberies and shootings ... according to the federal indictment.

The feds believe Tekashi himself pulled an armed robbery on April 3 along with his ex-manager, Shottie, and 2 other members of the Nine Trey Bloods. According to the docs, they robbed gang rivals at gunpoint.

The indictment also mentions the April 21 shooting incident at Barclays Center in Brooklyn ... and fingers Fuguan Lovick as the trigger man.

The indictment, first reported by the NY Daily News, lists 17 counts dating back to 2013.

The feds also say Tekashi and associates were hawking heroin, fentanyl, MDMA and marijuana all over NYC.

Tekashi69, his recently fired manager and 2 other former associates are in federal custody after getting busted on racketeering charges -- which almost certainly means the rapper's going to prison ... TMZ has learned.

Law enforcement sources tell us ... 6ix9ine was arrested Sunday night by ATF agents in NYC, and the agents also hauled in his ex-manager, Shotti, at the same time. You'll recall Tekashi had just fired Shottie and much of his management team last week.

One of the other suspects arrested is Faheem Walter -- aka Crippy -- who got shot a few weeks ago during the altercation with Tekashi's record label head.

All 4 men are facing racketeering and firearms charges. We're told the investigation was a joint effort by ATF, NYPD and Homeland Security.

It's interesting, Tekashi was on "The Breakfast Club" just last week and admitted he only feared two things ... God and the FBI.

Play video content The Breakfast Club

Tekashi was already skating on thin ice. As we reported, the judge who gave him probation in his child sex case had warned him to keep his nose clean ... or he'd be going straight to prison.